From 47a2abf0bc3c3dac0433754ad0365ebad152df8c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 25 Nov 2020 20:12:11 +0100 Subject: 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) --- src/testdir/test_vim9_cmd.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/testdir/test_vim9_cmd.vim') diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim index 97110ce527..d0f9872caa 100644 --- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -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 -- cgit v1.2.3