From 51c3e0aa806820ab24ee481ffc1f67cbef444206 Mon Sep 17 00:00:00 2001 From: watiko Date: Sun, 7 Feb 2016 13:14:43 +0900 Subject: vim-patch:7.4.929 Problem: "gv" after paste selects one character less if 'selection' is "exclusive". Solution: Increment the end position. (Christian Brabandt) https://github.com/vim/vim/commit/d29c6fea94947b3f4b54fbd5a6f832a7d744bf27 --- .../legacy/094_visual_mode_operators_spec.lua | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/functional') diff --git a/test/functional/legacy/094_visual_mode_operators_spec.lua b/test/functional/legacy/094_visual_mode_operators_spec.lua index 32ce713a02..4dce39b8d2 100644 --- a/test/functional/legacy/094_visual_mode_operators_spec.lua +++ b/test/functional/legacy/094_visual_mode_operators_spec.lua @@ -371,4 +371,28 @@ describe('Visual mode and operator', function() ]]) end) end) + + it('gv in exclusive select mode after operation', function() + source([[ + $put ='zzz ' + $put ='äà ' + set selection=exclusive]]) + feed('kv3lyjv3lpgvcxxx') + + expect([[ + + zzz + xxx ]]) + end) + + it('gv in exclusive select mode without operation', function() + source([[ + $put ='zzz ' + set selection=exclusive]]) + feed('0v3lgvcxxx') + + expect([[ + + xxx ]]) + end) end) -- cgit