Mercurial > vim
comparison src/testdir/test_help.vim @ 27466:8ed815f061af v8.2.4261
patch 8.2.4261: accessing invalid memory in a regular expression
Commit: https://github.com/vim/vim/commit/679d66c2d21dfe03d0f89b9a818b0aaebb4c3b87
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 30 16:42:56 2022 +0000
patch 8.2.4261: accessing invalid memory in a regular expression
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 Jan 2022 17:45:03 +0100 |
parents | e3f3108a780a |
children | 6ba17bf0f86a |
comparison
equal
deleted
inserted
replaced
27465:976fb709e91d | 27466:8ed815f061af |
---|---|
1 " Tests for :help | 1 " Tests for :help |
2 | 2 |
3 source check.vim | 3 source check.vim |
4 import './vim9.vim' as v9 | |
4 | 5 |
5 func Test_help_restore_snapshot() | 6 func Test_help_restore_snapshot() |
6 help | 7 help |
7 set buftype= | 8 set buftype= |
8 help | 9 help |
166 catch | 167 catch |
167 call assert_match("E149:", v:exception) | 168 call assert_match("E149:", v:exception) |
168 endtry | 169 endtry |
169 endfunc | 170 endfunc |
170 | 171 |
172 func Test_help_using_visual_match() | |
173 let lines =<< trim END | |
174 call setline(1, ' ') | |
175 /^ | |
176 exe "normal \<C-V>\<C-V>" | |
177 h5\%V] | |
178 END | |
179 call v9.CheckScriptFailure(lines, 'E149:') | |
180 endfunc | |
181 | |
171 | 182 |
172 " vim: shiftwidth=2 sts=2 expandtab | 183 " vim: shiftwidth=2 sts=2 expandtab |