From 1b0d371794804f0662e1c8aa130b4354548b8bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20Sch=C3=B6ttl?= Date: Sat, 26 Nov 2016 20:14:58 +0100 Subject: [PATCH] Bugfix: b and B set cursor to begin of word + 1 --- termite.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termite.cc b/termite.cc index aeb28cd..5182bfb 100644 --- a/termite.cc +++ b/termite.cc @@ -587,6 +587,7 @@ static void move_backward(VteTerminal *vte, select_info *select, F is_word) { bool in_word = false; for (long i = length - 2; i > 0; i--) { + cursor_col--; if (!is_word(codepoints[i - 1])) { if (in_word) { break; @@ -594,7 +595,6 @@ static void move_backward(VteTerminal *vte, select_info *select, F is_word) { } else { in_word = true; } - cursor_col--; } vte_terminal_set_cursor_position(vte, cursor_col, cursor_row); update_selection(vte, select);