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:
jelle van der Waa 2016-12-06 18:18:36 +01:00 committed by GitHub
commit e3a6814902
1 changed files with 1 additions and 1 deletions

View File

@ -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);