diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/getchar.c | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_mapping.vim | 18 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 43a4f31478..77e42d7471 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -3519,6 +3519,7 @@ static void showmap(mapblock_T *mp, bool local) if (p_verbose > 0) { last_set_msg(mp->m_script_ctx); } + msg_clr_eos(); ui_flush(); // show one line at a time } diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim index 105f70e6bb..1080a3c85b 100644 --- a/src/nvim/testdir/test_mapping.vim +++ b/src/nvim/testdir/test_mapping.vim @@ -474,7 +474,6 @@ func Test_expr_map_restore_cursor() END call writefile(lines, 'XtestExprMap') let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10}) - call term_wait(buf) call term_sendkeys(buf, "\<C-B>") call VerifyScreenDump(buf, 'Test_map_expr_1', {}) @@ -483,6 +482,22 @@ func Test_expr_map_restore_cursor() call delete('XtestExprMap') 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() CheckScreendump @@ -499,7 +514,6 @@ func Test_expr_map_error() END call writefile(lines, 'XtestExprMap') let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10}) - call TermWait(buf) call term_sendkeys(buf, "\<F2>") call TermWait(buf) call term_sendkeys(buf, "\<CR>") |