[geany/geany-plugins] 085c83: pairtaghighlighter: Fix clearing previous indicators

Colomban Wendling git-noreply at xxxxx
Mon Mar 9 16:06:34 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Mon, 09 Mar 2015 16:06:34 UTC
Commit:      085c83309ebf5c3a368b021b7f52d9af5a5e5fec
             https://github.com/geany/geany-plugins/commit/085c83309ebf5c3a368b021b7f52d9af5a5e5fec

Log Message:
-----------
pairtaghighlighter: Fix clearing previous indicators

The second argument for SCI_INDICATORCLEARRANGE is the length to clear,
not the end position.

This used to work on earlier versions of Scintilla for some reason,
probably because it didn't check length, but current versions do nothing
with an invalid length.


Modified Paths:
--------------
    pairtaghighlighter/src/pair_tag_highlighter.c

Modified: pairtaghighlighter/src/pair_tag_highlighter.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -150,7 +150,7 @@ static void highlight_matching_pair(ScintillaObject *sci)
 static void clear_previous_highlighting(ScintillaObject *sci, gint rangeStart, gint rangeEnd)
 {
     scintilla_send_message(sci, SCI_SETINDICATORCURRENT, INDICATOR_TAGMATCH, 0);
-    scintilla_send_message(sci, SCI_INDICATORCLEARRANGE, rangeStart, rangeEnd+1);
+    scintilla_send_message(sci, SCI_INDICATORCLEARRANGE, rangeStart, rangeEnd-rangeStart+1);
 }
 
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list