diff src/testdir/test_vim9_script.vim @ 21939:8350bdbdbb28 v8.2.1519

patch 8.2.1519: Vim9: Ex command default range is not set Commit: https://github.com/vim/vim/commit/c2af0afff5c44969ad7611ec2d47d0f52087fa7f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 23 21:06:02 2020 +0200 patch 8.2.1519: Vim9: Ex command default range is not set Problem: Vim9: Ex command default range is not set. Solution: When range is not given use default. (closes https://github.com/vim/vim/issues/6779)
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Aug 2020 21:15:04 +0200
parents b931df03adcc
children 3991a6df522e
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -15,6 +15,18 @@ def Test_range_only()
   setline(1, ['blah', 'Blah'])
   :/Blah/
   assert_equal(2, getcurpos()[1])
+  bwipe!
+
+  # without range commands use current line
+  new
+  setline(1, ['one', 'two', 'three'])
+  :2
+  print
+  assert_equal('two', Screenline(&lines))
+  :3
+  list
+  assert_equal('three$', Screenline(&lines))
+  bwipe!
 enddef
 
 let s:appendToMe = 'xxx'