[geany/geany] 59935a: Merge pull request #1356 from b4n/snippets-keybindings-signature

Colomban Wendling git-noreply at xxxxx
Thu Jan 12 18:39:42 UTC 2017


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Thu, 12 Jan 2017 18:39:42 UTC
Commit:      59935a3579df0d418cb483aa7f63515210690ce1
             https://github.com/geany/geany/commit/59935a3579df0d418cb483aa7f63515210690ce1

Log Message:
-----------
Merge pull request #1356 from b4n/snippets-keybindings-signature

Fix snippets keybindings not blocking handled events


Modified Paths:
--------------
    src/editor.c

Modified: src/editor.c
8 lines changed, 5 insertions(+), 3 deletions(-)
===================================================================
@@ -191,13 +191,13 @@ static void snippets_load(GKeyFile *sysconfig, GKeyFile *userconfig)
 }
 
 
-static void on_snippet_keybinding_activate(gchar *key)
+static gboolean on_snippet_keybinding_activate(gchar *key)
 {
 	GeanyDocument *doc = document_get_current();
 	const gchar *s;
 
 	if (!doc || !gtk_widget_has_focus(GTK_WIDGET(doc->editor->sci)))
-		return;
+		return FALSE;
 
 	s = snippets_find_completion_by_name(doc->file_type->name, key);
 	if (!s) /* allow user to specify keybindings for "special" snippets */
@@ -210,11 +210,13 @@ static void on_snippet_keybinding_activate(gchar *key)
 	if (!s)
 	{
 		utils_beep();
-		return;
+		return FALSE;
 	}
 
 	editor_insert_snippet(doc->editor, sci_get_current_position(doc->editor->sci), s);
 	sci_scroll_caret(doc->editor->sci);
+
+	return TRUE;
 }
 
 



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


More information about the Commits mailing list