summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-12 14:21:06 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-12 14:21:06 +0100
commit957cf67d50516ba98716f59c9e1cb6412ec1535d (patch)
treea1f287aee01e4cbb023b2531a5a4b90e9728a8bf /src/edit.c
parentea2d407f9c144bb634c59017944e4930ed7f80a2 (diff)
patch 8.2.1978: making a mapping work in all modes is complicatedv8.2.1978
Problem: Making a mapping work in all modes is complicated. Solution: Add the <Cmd> special key. (Yegappan Lakshmanan, closes #7282, closes 4784, based on patch by Bjorn Linse)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index 934f6c1983..d92a951398 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1031,6 +1031,10 @@ doESCkey:
case K_IGNORE: // Something mapped to nothing
break;
+ case K_COMMAND: // <Cmd>command<CR>
+ do_cmdline(NULL, getcmdkeycmd, NULL, 0);
+ break;
+
case K_CURSORHOLD: // Didn't type something for a while.
ins_apply_autocmds(EVENT_CURSORHOLDI);
did_cursorhold = TRUE;