summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-02-19 15:26:18 +0100
committerBram Moolenaar <Bram@vim.org>2017-02-19 15:26:18 +0100
commitd56a79d3396cf70861b7f739a3c400db91ce7b70 (patch)
tree0762c78f9b377635cb493f8698210636616b01c1 /src/edit.c
parent5acff71d3bd7796ee0a112ceb891af630b59304e (diff)
patch 8.0.0341: undo does not work properly when using completionv8.0.0341
Problem: When using complete() and typing a character undo is saved after the character was inserted. (Shougo) Solution: Save for undo before inserting the character.
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 a37261ffab..d7f89bcbed 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -3583,7 +3583,11 @@ ins_compl_addleader(int c)
{
#ifdef FEAT_MBYTE
int cc;
+#endif
+ if (stop_arrow() == FAIL)
+ return;
+#ifdef FEAT_MBYTE
if (has_mbyte && (cc = (*mb_char2len)(c)) > 1)
{
char_u buf[MB_MAXBYTES + 1];