Merge pull request #427 from schoettl/vim
b and B set wrong cursor position in word. Instead of setting the cursor position to the first character the position is was set to first character +1.
This commit is contained in:
commit
e3a6814902
|
@ -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