call update_selection in set_cursor_column
This commit is contained in:
parent
d3d7276ec0
commit
a1591e795a
|
@ -276,10 +276,11 @@ static void move_forward_word(VteTerminal *vte, select_info *select) {
|
||||||
g_free(content);
|
g_free(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_cursor_column(VteTerminal *vte, long column) {
|
static void set_cursor_column(VteTerminal *vte, const select_info *select, long column) {
|
||||||
long cursor_row;
|
long cursor_row;
|
||||||
vte_terminal_get_cursor_position(vte, nullptr, &cursor_row);
|
vte_terminal_get_cursor_position(vte, nullptr, &cursor_row);
|
||||||
vte_terminal_set_cursor_position(vte, column, cursor_row);
|
vte_terminal_set_cursor_position(vte, column, cursor_row);
|
||||||
|
update_selection(vte, select);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* {{{ CALLBACKS */
|
/* {{{ CALLBACKS */
|
||||||
|
@ -322,12 +323,10 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info)
|
||||||
move_forward_word(vte, &info->select);
|
move_forward_word(vte, &info->select);
|
||||||
break;
|
break;
|
||||||
case GDK_KEY_asciicircum:
|
case GDK_KEY_asciicircum:
|
||||||
set_cursor_column(vte, 0);
|
set_cursor_column(vte, &info->select, 0);
|
||||||
update_selection(vte, &info->select);
|
|
||||||
break;
|
break;
|
||||||
case GDK_KEY_dollar:
|
case GDK_KEY_dollar:
|
||||||
set_cursor_column(vte, vte_terminal_get_column_count(vte) - 1);
|
set_cursor_column(vte, &info->select, vte_terminal_get_column_count(vte) - 1);
|
||||||
update_selection(vte, &info->select);
|
|
||||||
break;
|
break;
|
||||||
case GDK_KEY_g:
|
case GDK_KEY_g:
|
||||||
move_to_row_start(vte, &info->select, first_row(vte));
|
move_to_row_start(vte, &info->select, first_row(vte));
|
||||||
|
|
Loading…
Reference in New Issue