summaryrefslogtreecommitdiff
path: root/src/testdir/test_help.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-30 16:42:56 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-30 16:42:56 +0000
commit679d66c2d21dfe03d0f89b9a818b0aaebb4c3b87 (patch)
treec9b166bba7deb0ed0f4f7f8974f4bf3a7079cf4f /src/testdir/test_help.vim
parent848faddb870f3ba4d84fcacd1cccb5cdbbfd9c41 (diff)
downloadvim-git-679d66c2d21dfe03d0f89b9a818b0aaebb4c3b87.tar.gz
patch 8.2.4261: accessing invalid memory in a regular expressionv8.2.4261
Problem: Accessing invalid memory when a regular expression checks the Visual area while matching in a string. Solution: Do not try matching the Visual area in a string.
Diffstat (limited to 'src/testdir/test_help.vim')
-rw-r--r--src/testdir/test_help.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_help.vim b/src/testdir/test_help.vim
index 3e358d6bb..b8b9bbc78 100644
--- a/src/testdir/test_help.vim
+++ b/src/testdir/test_help.vim
@@ -1,6 +1,7 @@
" Tests for :help
source check.vim
+import './vim9.vim' as v9
func Test_help_restore_snapshot()
help
@@ -168,5 +169,15 @@ func Test_help_long_argument()
endtry
endfunc
+func Test_help_using_visual_match()
+ let lines =<< trim END
+ call setline(1, ' ')
+ /^
+ exe "normal \<C-V>\<C-V>"
+ h5\%V€]
+ END
+ call v9.CheckScriptFailure(lines, 'E149:')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab