0
0
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:
Bram Moolenaar
2020-02-23 14:35:01 +01:00
parent 8040a7147f
commit 83f37b9142
3 changed files with 22 additions and 1 deletions

View File

@@ -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