forked from aniani/vim
patch 9.1.0582: Printed line doesn't overwrite colon when pressing Enter in Ex mode
Problem: Printed line no longer overwrites colon when pressing Enter in Ex mode (after 9.1.0573). Solution: Restore the behavior of pressing Enter in Ex mode. (zeertzjq) closes: #15258 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
d9be94cf03
commit
7d664bf0eb
@@ -68,7 +68,7 @@ func Test_Ex_substitute()
|
||||
CheckRunVimInTerminal
|
||||
let buf = RunVimInTerminal('', {'rows': 6})
|
||||
|
||||
call term_sendkeys(buf, ":call setline(1, ['foo foo', 'foo foo', 'foo foo'])\<CR>")
|
||||
call term_sendkeys(buf, ":call setline(1, repeat(['foo foo'], 4))\<CR>")
|
||||
call term_sendkeys(buf, ":set number\<CR>")
|
||||
call term_sendkeys(buf, "gQ")
|
||||
call WaitForAssert({-> assert_match(':', term_getline(buf, 6))}, 1000)
|
||||
@@ -90,8 +90,14 @@ func Test_Ex_substitute()
|
||||
|
||||
" Pressing enter in ex mode should print the current line
|
||||
call term_sendkeys(buf, "\<CR>")
|
||||
call WaitForAssert({-> assert_match(' 3 foo foo',
|
||||
\ term_getline(buf, 5))}, 1000)
|
||||
call WaitForAssert({-> assert_match(' 3 foo foo', term_getline(buf, 5))}, 1000)
|
||||
call WaitForAssert({-> assert_match(':', term_getline(buf, 6))}, 1000)
|
||||
|
||||
" The printed line should overwrite the colon
|
||||
call term_sendkeys(buf, "\<CR>")
|
||||
call WaitForAssert({-> assert_match(' 3 foo foo', term_getline(buf, 4))}, 1000)
|
||||
call WaitForAssert({-> assert_match(' 4 foo foo', term_getline(buf, 5))}, 1000)
|
||||
call WaitForAssert({-> assert_match(':', term_getline(buf, 6))}, 1000)
|
||||
|
||||
call term_sendkeys(buf, ":vi\<CR>")
|
||||
call WaitForAssert({-> assert_match('foo bar', term_getline(buf, 1))}, 1000)
|
||||
|
Reference in New Issue
Block a user