Mercurial > vim
comparison src/testdir/test_vim9_cmd.vim @ 28055:5bf3ed75e26c v8.2.4552
patch 8.2.4552: in a :def function "put = expr" does not work
Commit: https://github.com/vim/vim/commit/d0b7bfa95798f5ec743d8afffbffb83aeac823da
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 12 14:51:16 2022 +0000
patch 8.2.4552: in a :def function "put = expr" does not work
Problem: In a :def function "put = expr" does not work.
Solution: Skip over white space. (closes https://github.com/vim/vim/issues/9936)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 12 Mar 2022 16:00:03 +0100 |
parents | c31bee906b7a |
children | b96409b84eaf |
comparison
equal
deleted
inserted
replaced
28054:b31d4f3d2af9 | 28055:5bf3ed75e26c |
---|---|
1215 assert_equal('below', getline(4)) | 1215 assert_equal('below', getline(4)) |
1216 | 1216 |
1217 :2put =['a', 'b', 'c'] | 1217 :2put =['a', 'b', 'c'] |
1218 assert_equal(['ppp', 'a', 'b', 'c', 'above'], getline(2, 6)) | 1218 assert_equal(['ppp', 'a', 'b', 'c', 'above'], getline(2, 6)) |
1219 | 1219 |
1220 :0put ='first' | 1220 :0put = 'first' |
1221 assert_equal('first', getline(1)) | 1221 assert_equal('first', getline(1)) |
1222 :1put! ='first again' | 1222 :1put! ='first again' |
1223 assert_equal('first again', getline(1)) | 1223 assert_equal('first again', getline(1)) |
1224 | 1224 |
1225 # compute range at runtime | 1225 # compute range at runtime |