aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_visual.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-11 06:39:20 +0800
committerGitHub <noreply@github.com>2023-01-11 06:39:20 +0800
commit08d5b4275ecaae4d3329d4ed2469782f10dd463e (patch)
tree4b4c085f0585fcd4525df853c236b3cac248dde4 /src/nvim/testdir/test_visual.vim
parent15ee93c0b47957e3b6837d8325e555afa0f21993 (diff)
downloadrneovim-08d5b4275ecaae4d3329d4ed2469782f10dd463e.tar.gz
rneovim-08d5b4275ecaae4d3329d4ed2469782f10dd463e.tar.bz2
rneovim-08d5b4275ecaae4d3329d4ed2469782f10dd463e.zip
vim-patch:9.0.1172: when 'selection' is "exclusive" then "1v" is one char short (#21735)
Problem: When 'selection' is "exclusive" then "1v" is one char short. Solution: Add one character when 'selection' is "exclusive. (closes vim/vim#11791) https://github.com/vim/vim/commit/79c11e399be3d96ed6d1c7458b1380e878ec717b Cherry-pick update_curswant_force() refactor from patch 9.0.0482. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir/test_visual.vim')
-rw-r--r--src/nvim/testdir/test_visual.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim
index 712ea343ed..14d62089cf 100644
--- a/src/nvim/testdir/test_visual.vim
+++ b/src/nvim/testdir/test_visual.vim
@@ -1338,6 +1338,18 @@ func Test_visual_reselect_with_count()
call delete('XvisualReselect')
endfunc
+func Test_visual_reselect_exclusive()
+ new
+ call setline(1, ['abcde', 'abcde'])
+ set selection=exclusive
+ normal 1G0viwd
+ normal 2G01vd
+ call assert_equal(['', ''], getline(1, 2))
+
+ set selection&
+ bwipe!
+endfunc
+
func Test_visual_block_insert_round_off()
new
" The number of characters are tuned to fill a 4096 byte allocated block,