diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 09:46:26 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-04 10:07:05 +0800 |
| commit | 9476dd2f923d9e5d86237836131f67024613308f (patch) | |
| tree | 32295d58a80f90a2d3b1d66d9034c7bd2fc4a093 /src/nvim/testdir | |
| parent | 3f1ee12d311fffe30936217c74ef0352bb7d97d9 (diff) | |
| download | rneovim-9476dd2f923d9e5d86237836131f67024613308f.tar.gz rneovim-9476dd2f923d9e5d86237836131f67024613308f.tar.bz2 rneovim-9476dd2f923d9e5d86237836131f67024613308f.zip | |
vim-patch:8.2.3292: underscore in very magic pattern causes a hang
Problem: Underscore in very magic pattern causes a hang. Pattern with \V
are case sensitive. (Yutao Yuan)
Solution: Adjust condition for magicness and advance pointer. (Christian
Brabandt, closes vim/vim#8707, closes vim/vim#8704, closes vim/vim#8705)
https://github.com/vim/vim/commit/bc67e5a0a494f5fc48e872d747371e31a782d171
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_search.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 51e7064c94..a9cad3ed44 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -2048,6 +2048,17 @@ func Test_pattern_is_uppercase_smartcase() call assert_equal(['abc', 'ABC', 'Abc', ''], \ getline(1, '$')) + call setline(1, input) + call cursor(1,1) + " \Vabc should match everything + %s/\Vabc//g + call assert_equal(['', '', '', ''], getline(1, '$')) + + call setline(1, input + ['_abc']) + " _ matches normally + %s/\v_.*//g + call assert_equal(['abc', 'ABC', 'Abc', 'abC', ''], getline(1, '$')) + set smartcase& ignorecase& bw! endfunc |