[geany/geany] adbd16: Also consider tags up to date if realtime parsing is active
Colomban Wendling
git-noreply at xxxxx
Mon Sep 17 12:44:33 UTC 2012
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Mon, 17 Sep 2012 12:44:33
Commit: adbd162c7b8ca3e9e6f01ee1cc03c96c84c722b1
https://github.com/geany/geany/commit/adbd162c7b8ca3e9e6f01ee1cc03c96c84c722b1
Log Message:
-----------
Also consider tags up to date if realtime parsing is active
This makes symbols_get_current_function() more accurate by using TM
data even on a modified file if realtime tag parsing is enabled, thus
if the data has reasonable chances to be correct.
Modified Paths:
--------------
src/symbols.c
Modified: src/symbols.c
5 files changed, 3 insertions(+), 2 deletions(-)
===================================================================
@@ -2120,8 +2120,9 @@ gint symbols_get_current_function(GeanyDocument *doc, const gchar **tagname)
}
tm_file = doc->tm_file;
- /* if the document has no changes, get the previous function name from TM */
- if (! doc->changed && tm_file != NULL && tm_file->tags_array != NULL)
+ /* if the tags are up-to-date, get the previous function name from TM */
+ if (tm_file != NULL && tm_file->tags_array != NULL &&
+ (! doc->changed || editor_prefs.autocompletion_update_freq > 0))
{
const TMTag *tag = (const TMTag*) tm_get_current_function(tm_file->tags_array, line);
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
More information about the Commits
mailing list