Add configuration option tab_close_switch_to_mru to allow the user
to choose whether to switch to the most recently used tab or to the
next one after closing the current tab.
* Add new function: document_update_tags().
* Refactor the various tag update functions into document_update_tags().
* Remove extra call to update the tags in document_new_file().
Remove type keywords caching function since it doesn't really speed up
anything and we don't care if the keywords change since they can/should
still be reloaded. This also prevents "leaking" a static GString once
when the application closes and saves a call to g_string_free() when the
type keywords have changed.
Rename document_update_highlighting() to document_update_type_keywords()
since no re-highlighting is needed when updating Scintilla keywords.
Scintilla highlights the new keywords automatically so this saves a call
to queue_colourise().
Remove update_type_keywords() function since this is now all handled
in the document_update_type_keywords() function. This function had a
comment about updating all documents when sci is NULL but it was never
used in this way since it was only called on document_load_config() which
always operates on a single document and the sci should not be NULL.
Most notably, utils_get_line_endings() and document_open_file_list()
don't support -1 as the size anymore. If the size should be computed
from null-terminated data, the caller code must take care of doing so.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5855 ea778897-0a13-0410-b9d1-a72fbfd435f5
Previously we could put into a message a string where escape sequences
were already translated.
In the code, now we pass the original text together with the one
that is actually searched for. New `original_text' field was added to
GeanySearchData. A bug was fixed in document.c:show_replace_summary(): it
did not escape the "No matches found for ..." string.
Patch by Eugene Arshinov, thanks.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5832 ea778897-0a13-0410-b9d1-a72fbfd435f5
Fix idle tag list updating not to update the tag list if the current
document isn't the one to update anymore. In this case, mark the
document as needing an update and re-schedule an idle update next time
the document gets the focus.
This fixes updating the tag list after switching documents, which
resulted in displaying the wrong tag list.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5738 ea778897-0a13-0410-b9d1-a72fbfd435f5
Updating the parent may lead to performance issues if an object have
too many parents since they are updated recursively.
Parent objects are still updated when saving the file.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5642 ea778897-0a13-0410-b9d1-a72fbfd435f5
G_(UN)?LIKELY() should be only used on whole conditional expressions,
and only if the branching is very highly predictable, not if it is only
more probable.
These macros should be used with care because a wrong prediction may
be a lot worst than what a good prediction can give.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5625 ea778897-0a13-0410-b9d1-a72fbfd435f5
Show the Save As also for documents created from filetype templates instead of saving them directly with the untitled filename.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4494 ea778897-0a13-0410-b9d1-a72fbfd435f5
Make document_get_status_color() returning a const GdkColor.
Add editor_get_word_at_pos() and document_get_status_color() to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3567 ea778897-0a13-0410-b9d1-a72fbfd435f5
If GIO is available, use GFileMonitor to watch for file disk changes and indicate them immediately using an orange tab label colour.
Break plugin ABI for this and the last commits.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3484 ea778897-0a13-0410-b9d1-a72fbfd435f5