1
0
forked from aniani/vim

patch 8.1.0571: non-silent execute() resets display column to zero

Problem:    Non-silent execute() resets display column to zero.
Solution:   Keep the display column as-is.
This commit is contained in:
Bram Moolenaar
2018-12-08 13:57:42 +01:00
parent 539328197c
commit 446e7a3cd3
3 changed files with 32 additions and 3 deletions

View File

@@ -61,3 +61,20 @@ func Test_execute_does_not_change_col()
endfor
call assert_equal('abcdxyz', text)
endfunc
func Test_execute_not_silent()
echo ''
echon 'abcd'
let x = execute('echon 234', '')
echo 'xyz'
let text1 = ''
for col in range(1, 8)
let text1 .= nr2char(screenchar(&lines - 1, col))
endfor
call assert_equal('abcd234 ', text1)
let text2 = ''
for col in range(1, 4)
let text2 .= nr2char(screenchar(&lines, col))
endfor
call assert_equal('xyz ', text2)
endfunc