[geany/geany-plugins] fc6db1: Clear the markers when the cursor moves

gkatev git-noreply at xxxxx
Sun Oct 8 13:01:38 UTC 2017


Branch:      refs/heads/master
Author:      gkatev <george_kate at hotmail.com>
Committer:   gkatev <george_kate at hotmail.com>
Date:        Sun, 08 Oct 2017 13:01:38 UTC
Commit:      fc6db18b20ab81f177803fec807b36e2ed9d74ff
             https://github.com/geany/geany-plugins/commit/fc6db18b20ab81f177803fec807b36e2ed9d74ff

Log Message:
-----------
Clear the markers when the cursor moves

Problem: when text is highlighted, using the arrow keys will move the
cursor outside the selection, without clearing it

Feature added: listen for cursor movements and if there is no active
selection(selection, not highlighting), clear the markers


Modified Paths:
--------------
    addons/src/ao_markword.c

Modified: addons/src/ao_markword.c
11 lines changed, 11 insertions(+), 0 deletions(-)
===================================================================
@@ -182,6 +182,17 @@ void ao_mark_editor_notify(AoMarkWord *mw, GeanyEditor *editor, SCNotification *
 		
 		if(priv->enable_markword && priv->enable_single_click_deselect)
 			clear_marker();
+	} 
+	
+	// In single click deselect mode, clear the markers when the cursor moves
+	else if(nt->nmhdr.code == SCN_UPDATEUI && 
+		nt->updated == SC_UPDATE_SELECTION &&
+		!sci_has_selection(editor->sci)) 
+	{
+		AoMarkWordPrivate *priv = AO_MARKWORD_GET_PRIVATE(mw);
+		
+		if(priv->enable_markword && priv->enable_single_click_deselect)
+			clear_marker();
 	}
 }
 



--------------
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