summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index 642ff958b..e3e4624fb 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -587,8 +587,11 @@ edit(
if (stop_insert_mode)
{
// Insert mode ended, possibly from a callback.
+ if (c != K_IGNORE && c != K_NOP)
+ vungetc(c);
count = 0;
nomove = TRUE;
+ ins_compl_prep(ESC);
goto doESCkey;
}
} while (c == K_IGNORE || c == K_NOP);