From a1591e795ac061246b609fad62e2f4ba68674ebd Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 7 Sep 2012 22:49:16 -0400 Subject: [PATCH] call update_selection in set_cursor_column --- termite.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/termite.cc b/termite.cc index 6c9d343..2e9dd1f 100644 --- a/termite.cc +++ b/termite.cc @@ -276,10 +276,11 @@ static void move_forward_word(VteTerminal *vte, select_info *select) { 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; vte_terminal_get_cursor_position(vte, nullptr, &cursor_row); vte_terminal_set_cursor_position(vte, column, cursor_row); + update_selection(vte, select); } /* {{{ CALLBACKS */ @@ -322,12 +323,10 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info) move_forward_word(vte, &info->select); break; case GDK_KEY_asciicircum: - set_cursor_column(vte, 0); - update_selection(vte, &info->select); + set_cursor_column(vte, &info->select, 0); break; case GDK_KEY_dollar: - set_cursor_column(vte, vte_terminal_get_column_count(vte) - 1); - update_selection(vte, &info->select); + set_cursor_column(vte, &info->select, vte_terminal_get_column_count(vte) - 1); break; case GDK_KEY_g: move_to_row_start(vte, &info->select, first_row(vte));