[geany/geany] 14904a: Added keybinding for Delete from line start to current position

Abel 'Akronix' Serrano Juste git-noreply at xxxxx
Wed Jul 13 22:51:10 UTC 2016


Branch:      refs/heads/master
Author:      Abel 'Akronix' Serrano Juste <akronix5 at gmail.com>
Committer:   Matthew Brush <matt at geany.org>
Date:        Wed, 13 Jul 2016 22:51:10 UTC
Commit:      14904a18ff75926a75a648f55dcf71376cc2be23
             https://github.com/geany/geany/commit/14904a18ff75926a75a648f55dcf71376cc2be23

Log Message:
-----------
Added keybinding for Delete from line start to current position

Closes #1134


Modified Paths:
--------------
    doc/geany.txt
    src/editor.c
    src/keybindings.c
    src/keybindings.h

Modified: doc/geany.txt
3 lines changed, 3 insertions(+), 0 deletions(-)
===================================================================
@@ -3347,6 +3347,9 @@ Delete current line(s)          Ctrl-K                    Deletes the current li
 Delete to line end              Ctrl-Shift-Delete         Deletes from the current caret position to the
                                                           end of the current line.
 
+Delete to line start            Ctrl-Shift-BackSpace      Deletes from the beginning of the line to the
+                                                          current caret position.
+
 Duplicate line or selection     Ctrl-D                    Duplicates the current line or selection.
 
 Transpose current line                                    Transposes the current line with the previous one.


Modified: src/editor.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -4815,6 +4815,7 @@ static void setup_sci_keys(ScintillaObject *sci)
 	sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16)); /* line cut */
 	sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line delete */
 	sci_clear_cmdkey(sci, SCK_DELETE | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line to end delete */
+	sci_clear_cmdkey(sci, SCK_BACK | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line to beginning delete */
 	sci_clear_cmdkey(sci, '/' | (SCMOD_CTRL << 16)); /* Previous word part */
 	sci_clear_cmdkey(sci, '\\' | (SCMOD_CTRL << 16)); /* Next word part */
 	sci_clear_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16)); /* scroll line up */


Modified: src/keybindings.c
6 lines changed, 6 insertions(+), 0 deletions(-)
===================================================================
@@ -386,6 +386,9 @@ static void init_default_kb(void)
 	add_kb(group, GEANY_KEYS_EDITOR_DELETELINETOEND, NULL,
 		GDK_Delete, GDK_SHIFT_MASK | GEANY_PRIMARY_MOD_MASK, "edit_deletelinetoend",
 		_("Delete to line end"), NULL);
+	add_kb(group, GEANY_KEYS_EDITOR_DELETELINETOBEGINNING, NULL,
+		GDK_BackSpace, GDK_SHIFT_MASK | GEANY_PRIMARY_MOD_MASK, "edit_deletelinetobegin",
+		_("Delete to beginning of line"), NULL);
 	/* Note: transpose may fit better in format group, but that would break the API */
 	add_kb(group, GEANY_KEYS_EDITOR_TRANSPOSELINE, NULL,
 		0, 0, "edit_transposeline", _("_Transpose Current Line"), NULL);
@@ -2134,6 +2137,9 @@ static gboolean cb_func_editor_action(guint key_id)
 		case GEANY_KEYS_EDITOR_DELETELINETOEND:
 			sci_send_command(doc->editor->sci, SCI_DELLINERIGHT);
 			break;
+		case GEANY_KEYS_EDITOR_DELETELINETOBEGINNING:
+			sci_send_command(doc->editor->sci, SCI_DELLINELEFT);
+			break;
 		case GEANY_KEYS_EDITOR_TRANSPOSELINE:
 			sci_send_command(doc->editor->sci, SCI_LINETRANSPOSE);
 			break;


Modified: src/keybindings.h
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -185,6 +185,7 @@ enum GeanyKeyBindingID
 	GEANY_KEYS_GOTO_TAGDEFINITION,				/**< Keybinding. */
 	GEANY_KEYS_SEARCH_NEXTMESSAGE,				/**< Keybinding. */
 	GEANY_KEYS_EDITOR_DELETELINETOEND,			/**< Keybinding. */
+	GEANY_KEYS_EDITOR_DELETELINETOBEGINNING,	/**< Keybinding. */
 	GEANY_KEYS_FORMAT_AUTOINDENT,				/**< Keybinding. */
 	GEANY_KEYS_FILE_OPENSELECTED,				/**< Keybinding. */
 	GEANY_KEYS_GOTO_BACK,						/**< Keybinding. */



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