aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-05-24 05:57:00 +0800
committerGitHub <noreply@github.com>2024-05-24 05:57:00 +0800
commite7859d2ad504a3e3cae1d540d5fd4f9b560d154a (patch)
treedce2699ec3634cf3e542d0d2605a25e43d1ede3a /test
parent0d3d198109ff971c1537dc5361437d0397dba7af (diff)
downloadrneovim-e7859d2ad504a3e3cae1d540d5fd4f9b560d154a.tar.gz
rneovim-e7859d2ad504a3e3cae1d540d5fd4f9b560d154a.tar.bz2
rneovim-e7859d2ad504a3e3cae1d540d5fd4f9b560d154a.zip
vim-patch:9.1.0436: Crash when using '?' as separator for :s (#28955)
Problem: Crash when using '?' as separator for :s and pattern contains escaped '?'s (after 9.1.0409). Solution: Always compute startplen. (zeertzjq). related: neovim/neovim#28935 closes: 14832 https://github.com/vim/vim/commit/789679cfc4f39505b135220672b43a260d8ca3b4
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_substitute.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/old/testdir/test_substitute.vim b/test/old/testdir/test_substitute.vim
index a9e317da02..bce2e6ea73 100644
--- a/test/old/testdir/test_substitute.vim
+++ b/test/old/testdir/test_substitute.vim
@@ -173,6 +173,16 @@ func Test_substitute_repeat()
call feedkeys("Qsc\<CR>y", 'tx')
bwipe!
endfunc
+
+" Test :s with ? as separator.
+func Test_substitute_question_separator()
+ new
+ call setline(1, '??:??')
+ %s?\?\??!!?g
+ call assert_equal('!!:!!', getline(1))
+ bwipe!
+endfunc
+
" Test %s/\n// which is implemented as a special case to use a
" more efficient join rather than doing a regular substitution.
func Test_substitute_join()