summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-14 21:34:59 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-14 21:34:59 +0100
commite41decc892a115335259096c3bc0204dd99b372b (patch)
tree45f16ad3fce28d98a5f9f259f16be11c37f0671a /src/edit.c
parent6453cc8078af403956d0e8c1849cf5ec0aae86b2 (diff)
downloadvim-git-e41decc892a115335259096c3bc0204dd99b372b.tar.gz
patch 8.2.1988: still in Insert mode when opening terminal popupv8.2.1988
Problem: Still in Insert mode when opening terminal popup with a <Cmd> mapping in Insert mode. Solution: Exit Insert mode. (closes #7295)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index d92a95139..8c5cec3a7 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -1033,6 +1033,11 @@ doESCkey:
case K_COMMAND: // <Cmd>command<CR>
do_cmdline(NULL, getcmdkeycmd, NULL, 0);
+#ifdef FEAT_TERMINAL
+ if (term_use_loop())
+ // Started a terminal that gets the input, exit Insert mode.
+ goto doESCkey;
+#endif
break;
case K_CURSORHOLD: // Didn't type something for a while.