Bugfix: b and B set cursor to begin of word + 1
This commit is contained in:
parent
7930760a6a
commit
1b0d371794
|
@ -587,6 +587,7 @@ static void move_backward(VteTerminal *vte, select_info *select, F is_word) {
|
||||||
bool in_word = false;
|
bool in_word = false;
|
||||||
|
|
||||||
for (long i = length - 2; i > 0; i--) {
|
for (long i = length - 2; i > 0; i--) {
|
||||||
|
cursor_col--;
|
||||||
if (!is_word(codepoints[i - 1])) {
|
if (!is_word(codepoints[i - 1])) {
|
||||||
if (in_word) {
|
if (in_word) {
|
||||||
break;
|
break;
|
||||||
|
@ -594,7 +595,6 @@ static void move_backward(VteTerminal *vte, select_info *select, F is_word) {
|
||||||
} else {
|
} else {
|
||||||
in_word = true;
|
in_word = true;
|
||||||
}
|
}
|
||||||
cursor_col--;
|
|
||||||
}
|
}
|
||||||
vte_terminal_set_cursor_position(vte, cursor_col, cursor_row);
|
vte_terminal_set_cursor_position(vte, cursor_col, cursor_row);
|
||||||
update_selection(vte, select);
|
update_selection(vte, select);
|
||||||
|
|
Loading…
Reference in New Issue