Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Wed, 19 Feb 2014 00:05:37 UTC Commit: c078a13019dc7a0a2789bf672feceaa9cb91f1c3 https://github.com/geany/geany/commit/c078a13019dc7a0a2789bf672feceaa9cb91f1...
Log Message: ----------- TM: simplify match test for current tag
Modified Paths: -------------- tagmanager/src/tm_workspace.c
Modified: tagmanager/src/tm_workspace.c 4 lines changed, 1 insertions(+), 3 deletions(-) =================================================================== @@ -751,13 +751,11 @@ tm_get_current_tag (GPtrArray * file_tags, const gulong line, const guint tag_ty { guint i; gulong matching_line = 0; - glong delta;
for (i = 0; (i < local->len); ++i) { TMTag *tag = TM_TAG (local->pdata[i]); - delta = line - tag->atts.entry.line; - if (delta >= 0 && (gulong)delta < line - matching_line) + if (tag->atts.entry.line <= line && tag->atts.entry.line > matching_line) { matching_tag = tag; matching_line = tag->atts.entry.line;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).