0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

patch 8.2.2052: Vim9: "edit +4 fname" gives an error

Problem:    Vim9: "edit +4 fname" gives an error. (Naruhiko Nishino)
Solution:   Allow using a range in the +cmd argument. (closes #7364)
This commit is contained in:
Bram Moolenaar
2020-11-25 20:12:11 +01:00
parent 34c54eb6cb
commit 47a2abf0bc
6 changed files with 41 additions and 12 deletions

View File

@@ -648,5 +648,17 @@ def Test_star_command()
CheckScriptSuccess(lines)
enddef
def Test_cmd_argument_without_colon()
new Xfile
setline(1, ['a', 'b', 'c', 'd'])
write
edit +3 %
assert_equal(3, getcurpos()[1])
edit +/a %
assert_equal(1, getcurpos()[1])
bwipe
delete('Xfile')
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker