add $ (EOL) and ^ (BOL) bindings to selection mode
This commit is contained in:
parent
07b88a9cfb
commit
ac2585297c
|
@ -39,6 +39,8 @@ TEXT SELECTION MODE
|
|||
* ``V``: visual line mode
|
||||
* ``ctrl-v``: visual block mode
|
||||
* ``h``/``j``/``k``/``l`` or arrow keys: move cursor left/down/up/right
|
||||
* ``$``: end-of-line
|
||||
* ``^``: beginning-of-line
|
||||
|
||||
TODO
|
||||
====
|
||||
|
|
|
@ -154,6 +154,7 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, search_panel_info *i
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
char *eol;
|
||||
switch (event->keyval) {
|
||||
case GDK_KEY_Left:
|
||||
case GDK_KEY_h:
|
||||
|
@ -171,6 +172,14 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, search_panel_info *i
|
|||
case GDK_KEY_l:
|
||||
vte_terminal_feed(vte, CSI "1C", strlen(CSI "1C"));
|
||||
break;
|
||||
case GDK_KEY_asciicircum:
|
||||
vte_terminal_feed(vte, CSI "0G", strlen(CSI "0G"));
|
||||
break;
|
||||
case GDK_KEY_dollar:
|
||||
eol = g_strdup_printf(CSI "%ldG", vte_terminal_get_column_count(vte));
|
||||
vte_terminal_feed(vte, eol, (long)strlen(eol));
|
||||
g_free(eol);
|
||||
break;
|
||||
case GDK_KEY_v:
|
||||
toggle_visual(vte, &info->select, SELECT_VISUAL);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue