From 14c543231cfb1c34143d5d014c59f2b41cedffc3 Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Tue, 9 Feb 2016 23:37:06 +0100 Subject: vim-patch:7.4.847 Problem: "vi)d" may leave a character behind. Solution: Skip over multi-byte character. (Christian Brabandt) https://github.com/vim/vim/commit/8667d66ca923d361e00e6369cbff37283db5a432 --- src/nvim/search.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/nvim/search.c') diff --git a/src/nvim/search.c b/src/nvim/search.c index 2dd0201259..c7a1ab3fb1 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -3140,10 +3140,12 @@ current_block ( } if (VIsual_active) { - if (*p_sel == 'e') - ++curwin->w_cursor.col; - if (sol && gchar_cursor() != NUL) - inc(&curwin->w_cursor); /* include the line break */ + if (*p_sel == 'e') { + inc(&curwin->w_cursor); + } + if (sol && gchar_cursor() != NUL) { + inc(&curwin->w_cursor); // include the line break + } VIsual = start_pos; VIsual_mode = 'v'; redraw_curbuf_later(INVERTED); /* update the inversion */ -- cgit