Mercurial > vim
comparison src/testdir/test_execute_func.vim @ 15117:2fed75dee954 v8.1.0569
patch 8.1.0569: execute() always resets display column to zero
commit https://github.com/vim/vim/commit/10ccaa17ec8b2be1132fd19059e1cd5fb5c902c4
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 7 16:38:23 2018 +0100
patch 8.1.0569: execute() always resets display column to zero
Problem: Execute() always resets display column to zero. (Sha Liu)
Solution: Don't reset it to zero, restore the previous value. (closes https://github.com/vim/vim/issues/3669)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 07 Dec 2018 16:45:05 +0100 |
parents | 9da0cb39cbee |
children | 895abc8a5195 |
comparison
equal
deleted
inserted
replaced
15116:80ba0405fcd2 | 15117:2fed75dee954 |
---|---|
47 call assert_equal("\n0\n1\n2\n3", execute(l)) | 47 call assert_equal("\n0\n1\n2\n3", execute(l)) |
48 | 48 |
49 call assert_equal("", execute([])) | 49 call assert_equal("", execute([])) |
50 call assert_equal("", execute(test_null_list())) | 50 call assert_equal("", execute(test_null_list())) |
51 endfunc | 51 endfunc |
52 | |
53 func Test_execute_does_not_change_col() | |
54 echo '' | |
55 echon 'abcd' | |
56 let x = execute('silent echo 234343') | |
57 echon 'xyz' | |
58 let text = '' | |
59 for col in range(1, 7) | |
60 let text .= nr2char(screenchar(&lines, col)) | |
61 endfor | |
62 call assert_equal('abcdxyz', text) | |
63 endfunc |