From 28d3923bd8123b0e57f1f9ffef57356f19476915 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Wed, 24 Dec 2014 14:34:04 +0100 Subject: vim-patch:7.4.547 Problem: Using "vit" does not select a multi-byte character at the end correctly. Solution: Advance the cursor over the multi-byte character. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-547 --- src/nvim/search.c | 7 ++++--- src/nvim/version.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/search.c b/src/nvim/search.c index ef98944a06..5158e6cd86 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -3294,10 +3294,11 @@ again: if (VIsual_active) { /* If the end is before the start there is no text between tags, select * the char under the cursor. */ - if (lt(end_pos, start_pos)) + if (lt(end_pos, start_pos)) { curwin->w_cursor = start_pos; - else if (*p_sel == 'e') - ++curwin->w_cursor.col; + } else if (*p_sel == 'e') { + inc_cursor(); + } VIsual = start_pos; VIsual_mode = 'v'; redraw_curbuf_later(INVERTED); /* update the inversion */ diff --git a/src/nvim/version.c b/src/nvim/version.c index 22b7b54019..6bbb5e6024 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -191,7 +191,7 @@ static int included_patches[] = { //550, //549, //548 NA - //547, + 547, //546, 545, //544 NA -- cgit