mirror of
https://github.com/vim/vim.git
synced 2025-10-17 07:44:28 -04:00
patch 8.2.0306: Vim9: :substitute(pat(repl does not work in Vim9 script
Problem: Vim9: :substitute(pat(repl does not work in Vim9 script. Solution: Remember starting with a colon. (closes #5676)
This commit is contained in:
@@ -580,6 +580,21 @@ def Test_substitute_cmd()
|
||||
setline(1, 'something')
|
||||
:substitute(some(other(
|
||||
assert_equal('otherthing', getline(1))
|
||||
bwipe!
|
||||
|
||||
" also when the context is Vim9 script
|
||||
let lines =<< trim END
|
||||
vim9script
|
||||
new
|
||||
setline(1, 'something')
|
||||
:substitute(some(other(
|
||||
assert_equal('otherthing', getline(1))
|
||||
bwipe!
|
||||
END
|
||||
writefile(lines, 'Xvim9lines')
|
||||
source Xvim9lines
|
||||
|
||||
delete('Xvim9lines')
|
||||
enddef
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user