Add Go to Start/End of Line keybindings (#1996175).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2730 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
2ba80013bc
commit
e49c35299a
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
* src/interface.c, src/callbacks.c, src/callbacks.h, geany.glade:
|
* src/interface.c, src/callbacks.c, src/callbacks.h, geany.glade:
|
||||||
Add 'Close Other Documents' File menu command (#1976724).
|
Add 'Close Other Documents' File menu command (#1976724).
|
||||||
|
* src/keybindings.c, src/keybindings.h, src/editor.c:
|
||||||
|
Add Go to Start/End of Line keybindings (#1996175).
|
||||||
|
|
||||||
|
|
||||||
2008-06-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
2008-06-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||||
|
@ -3378,6 +3378,8 @@ static void setup_sci_keys(ScintillaObject *sci)
|
|||||||
sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line delete */
|
sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line delete */
|
||||||
sci_clear_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16)); /* scroll line up */
|
sci_clear_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16)); /* scroll line up */
|
||||||
sci_clear_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16)); /* scroll line down */
|
sci_clear_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16)); /* scroll line down */
|
||||||
|
sci_clear_cmdkey(sci, SCK_HOME); /* line start */
|
||||||
|
sci_clear_cmdkey(sci, SCK_END); /* line end */
|
||||||
|
|
||||||
if (editor_prefs.use_gtk_word_boundaries)
|
if (editor_prefs.use_gtk_word_boundaries)
|
||||||
{
|
{
|
||||||
|
@ -353,6 +353,10 @@ static void init_default_kb(void)
|
|||||||
0, 0, "popup_gototagdefinition", _("Go to Tag Definition"), NULL);
|
0, 0, "popup_gototagdefinition", _("Go to Tag Definition"), NULL);
|
||||||
keybindings_set_item(group, GEANY_KEYS_GOTO_TAGDECLARATION, cb_func_goto_action,
|
keybindings_set_item(group, GEANY_KEYS_GOTO_TAGDECLARATION, cb_func_goto_action,
|
||||||
0, 0, "popup_gototagdeclaration", _("Go to Tag Declaration"), NULL);
|
0, 0, "popup_gototagdeclaration", _("Go to Tag Declaration"), NULL);
|
||||||
|
keybindings_set_item(group, GEANY_KEYS_GOTO_LINESTART, cb_func_goto_action,
|
||||||
|
GDK_Home, 0, "edit_gotolinestart", _("Go to Start of Line"), NULL);
|
||||||
|
keybindings_set_item(group, GEANY_KEYS_GOTO_LINEEND, cb_func_goto_action,
|
||||||
|
GDK_End, 0, "edit_gotolineend", _("Go to End of Line"), NULL);
|
||||||
|
|
||||||
group = ADD_KB_GROUP(VIEW, _("View"));
|
group = ADD_KB_GROUP(VIEW, _("View"));
|
||||||
|
|
||||||
@ -1404,6 +1408,12 @@ static void cb_func_goto_action(guint key_id)
|
|||||||
if (check_current_word())
|
if (check_current_word())
|
||||||
symbols_goto_tag(editor_info.current_word, FALSE);
|
symbols_goto_tag(editor_info.current_word, FALSE);
|
||||||
break;
|
break;
|
||||||
|
case GEANY_KEYS_GOTO_LINESTART:
|
||||||
|
sci_cmd(doc->sci, editor_prefs.smart_home_key ? SCI_VCHOME : SCI_HOME);
|
||||||
|
break;
|
||||||
|
case GEANY_KEYS_GOTO_LINEEND:
|
||||||
|
sci_cmd(doc->sci, SCI_LINEEND);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,6 +225,8 @@ enum
|
|||||||
GEANY_KEYS_GOTO_PREVIOUSMARKER,
|
GEANY_KEYS_GOTO_PREVIOUSMARKER,
|
||||||
GEANY_KEYS_GOTO_TAGDEFINITION,
|
GEANY_KEYS_GOTO_TAGDEFINITION,
|
||||||
GEANY_KEYS_GOTO_TAGDECLARATION,
|
GEANY_KEYS_GOTO_TAGDECLARATION,
|
||||||
|
GEANY_KEYS_GOTO_LINESTART,
|
||||||
|
GEANY_KEYS_GOTO_LINEEND,
|
||||||
GEANY_KEYS_GOTO_COUNT
|
GEANY_KEYS_GOTO_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user