summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-16 18:27:55 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-16 18:27:55 +0000
commitd288eaad846f0e07e0141226f97d858dcf96cb78 (patch)
tree490599437d9eab23429353ddf151ac06fb0a510b
parent646bb7247ad6051aca223a2b04b008f682cdb57f (diff)
patch 8.2.4401: map listing does not clear the rest of the command linev8.2.4401
Problem: Map listing does not clear the rest of the command line. Solution: Call msg_clear_eos(). (closes #5623, closes #5962)
-rw-r--r--src/map.c1
-rw-r--r--src/testdir/dumps/Test_map_list_1.dump6
-rw-r--r--src/testdir/test_mapping.vim18
-rw-r--r--src/version.c2
4 files changed, 25 insertions, 2 deletions
diff --git a/src/map.c b/src/map.c
index e45ea757e9..b681d2ff2b 100644
--- a/src/map.c
+++ b/src/map.c
@@ -204,6 +204,7 @@ showmap(
if (p_verbose > 0)
last_set_msg(mp->m_script_ctx);
#endif
+ msg_clr_eos();
out_flush(); // show one line at a time
}
diff --git a/src/testdir/dumps/Test_map_list_1.dump b/src/testdir/dumps/Test_map_list_1.dump
new file mode 100644
index 0000000000..64bdcf93a5
--- /dev/null
+++ b/src/testdir/dumps/Test_map_list_1.dump
@@ -0,0 +1,6 @@
+> +0&#ffffff0@74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|n+0#0000000&| @1|a| @12|b| @38|0|,|0|-|1| @8|A|l@1|
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index e18927cfcf..35db436374 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -540,7 +540,6 @@ func Test_expr_map_restore_cursor()
END
call writefile(lines, 'XtestExprMap')
let buf = RunVimInTerminal('-S XtestExprMap', #{rows: 10})
- call TermWait(buf)
call term_sendkeys(buf, "\<C-B>")
call VerifyScreenDump(buf, 'Test_map_expr_1', {})
@@ -549,6 +548,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
@@ -565,7 +580,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>")
diff --git a/src/version.c b/src/version.c
index abee2ffde5..8b9d244f11 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4401,
+/**/
4400,
/**/
4399,