mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:8.2.4401: map listing does not clear the rest of the command line
Problem: Map listing does not clear the rest of the command line.
Solution: Call msg_clear_eos(). (closes vim/vim#5623, closes vim/vim#5962)
d288eaad84
This commit is contained in:
@@ -3519,6 +3519,7 @@ static void showmap(mapblock_T *mp, bool local)
|
|||||||
if (p_verbose > 0) {
|
if (p_verbose > 0) {
|
||||||
last_set_msg(mp->m_script_ctx);
|
last_set_msg(mp->m_script_ctx);
|
||||||
}
|
}
|
||||||
|
msg_clr_eos();
|
||||||
ui_flush(); // show one line at a time
|
ui_flush(); // show one line at a time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -474,7 +474,6 @@ func Test_expr_map_restore_cursor()
|
|||||||
END
|
END
|
||||||
call writefile(lines, 'XtestExprMap')
|
call writefile(lines, 'XtestExprMap')
|
||||||
let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
|
let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
|
||||||
call term_wait(buf)
|
|
||||||
call term_sendkeys(buf, "\<C-B>")
|
call term_sendkeys(buf, "\<C-B>")
|
||||||
call VerifyScreenDump(buf, 'Test_map_expr_1', {})
|
call VerifyScreenDump(buf, 'Test_map_expr_1', {})
|
||||||
|
|
||||||
@@ -483,6 +482,22 @@ func Test_expr_map_restore_cursor()
|
|||||||
call delete('XtestExprMap')
|
call delete('XtestExprMap')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_map_listing()
|
||||||
|
CheckScreendump
|
||||||
|
|
||||||
|
let lines =<< trim END
|
||||||
|
nmap a b
|
||||||
|
END
|
||||||
|
call writefile(lines, 'XtestMapList')
|
||||||
|
let buf = RunVimInTerminal('-S XtestMapList', #{rows: 6})
|
||||||
|
call term_sendkeys(buf, ": nmap a\<CR>")
|
||||||
|
call VerifyScreenDump(buf, 'Test_map_list_1', {})
|
||||||
|
|
||||||
|
" clean up
|
||||||
|
call StopVimInTerminal(buf)
|
||||||
|
call delete('XtestMapList')
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_expr_map_error()
|
func Test_expr_map_error()
|
||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
@@ -499,7 +514,6 @@ func Test_expr_map_error()
|
|||||||
END
|
END
|
||||||
call writefile(lines, 'XtestExprMap')
|
call writefile(lines, 'XtestExprMap')
|
||||||
let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
|
let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
|
||||||
call TermWait(buf)
|
|
||||||
call term_sendkeys(buf, "\<F2>")
|
call term_sendkeys(buf, "\<F2>")
|
||||||
call TermWait(buf)
|
call TermWait(buf)
|
||||||
call term_sendkeys(buf, "\<CR>")
|
call term_sendkeys(buf, "\<CR>")
|
||||||
|
Reference in New Issue
Block a user