Mercurial > vim
changeset 7241:0c1278704b5c v7.4.929
commit https://github.com/vim/vim/commit/d29c6fea94947b3f4b54fbd5a6f832a7d744bf27
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 19 20:11:54 2015 +0100
patch 7.4.929
Problem: "gv" after paste selects one character less if 'selection' is
"exclusive".
Solution: Increment the end position. (Christian Brabandt)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 19 Nov 2015 20:15:04 +0100 |
parents | db447f019c7c |
children | c754b2f307a2 |
files | src/normal.c src/testdir/test94.in src/testdir/test94.ok src/version.c |
diffstat | 4 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -9496,6 +9496,9 @@ nv_put(cap) { curbuf->b_visual.vi_start = curbuf->b_op_start; curbuf->b_visual.vi_end = curbuf->b_op_end; + /* need to adjust cursor position */ + if (*p_sel == 'e') + inc(&curbuf->b_visual.vi_end); } /* When all lines were selected and deleted do_put() leaves an empty
--- a/src/testdir/test94.in +++ b/src/testdir/test94.in @@ -210,6 +210,21 @@ k$v$p :-2yank $v$p :$put ='---' +: +:$put ='' +:$put ='gv in exclusive select mode after operation' +:$put ='zzz ' +:$put ='äà ' +:set selection=exclusive +kv3lyjv3lpgvcxxx +:$put ='---' +: +:$put ='' +:$put ='gv in exclusive select mode without operation' +:$put ='zzz ' +:set selection=exclusive +0v3lgvcxxx +:$put ='---' :/^start:/+2,$w! test.out :q! ENDTEST