Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
21938:9131ebc53d38 | 21939:8350bdbdbb28 |
---|---|
13 def Test_range_only() | 13 def Test_range_only() |
14 new | 14 new |
15 setline(1, ['blah', 'Blah']) | 15 setline(1, ['blah', 'Blah']) |
16 :/Blah/ | 16 :/Blah/ |
17 assert_equal(2, getcurpos()[1]) | 17 assert_equal(2, getcurpos()[1]) |
18 bwipe! | |
19 | |
20 # without range commands use current line | |
21 new | |
22 setline(1, ['one', 'two', 'three']) | |
23 :2 | |
24 print | |
25 assert_equal('two', Screenline(&lines)) | |
26 :3 | |
27 list | |
28 assert_equal('three$', Screenline(&lines)) | |
29 bwipe! | |
18 enddef | 30 enddef |
19 | 31 |
20 let s:appendToMe = 'xxx' | 32 let s:appendToMe = 'xxx' |
21 let s:addToMe = 111 | 33 let s:addToMe = 111 |
22 let g:existing = 'yes' | 34 let g:existing = 'yes' |