aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-10 20:32:13 +0800
committerGitHub <noreply@github.com>2022-03-10 20:32:13 +0800
commit3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7 (patch)
tree4dce94dcf97eb45765253bc9834e64a9ed014077 /src/nvim/testdir
parent9e9322b222566c0f92bb6df034d9b316317c81d5 (diff)
parenta80ec88906220b6527c553f7614180ba3bfde169 (diff)
downloadrneovim-3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7.tar.gz
rneovim-3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7.tar.bz2
rneovim-3a32aa96159ae1fdd0efd55389a4b1c2f92c98f7.zip
Merge pull request #17671 from zeertzjq/vim-8.2.3949
vim-patch:8.2.{3949,3950}: fix two crashes with /\%V
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_regexp_latin.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_regexp_latin.vim b/src/nvim/testdir/test_regexp_latin.vim
index a92f7e1192..a0f5ebfb9f 100644
--- a/src/nvim/testdir/test_regexp_latin.vim
+++ b/src/nvim/testdir/test_regexp_latin.vim
@@ -795,4 +795,20 @@ func Test_using_mark_position()
bwipe!
endfunc
+func Test_using_visual_position()
+ " this was using freed memory
+ new
+ exe "norm 0o\<Esc>\<C-V>k\<C-X>o0"
+ /\%V
+ bwipe!
+endfunc
+
+func Test_using_invalid_visual_position()
+ " this was going beyond the end of the line
+ new
+ exe "norm 0o000\<Esc>0\<C-V>$s0"
+ /\%V
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab