summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-12-09 19:36:56 +0100
committerBram Moolenaar <Bram@vim.org>2016-12-09 19:36:56 +0100
commit73fd4988866c3adc15b5d093efdf5e8cf70d093d (patch)
treef4cd6a17b1c30d955074c3ff01aef81b27fd2a2a /src/edit.c
parent6270660611a151c5d0f614a5f0248ccdc80ed971 (diff)
patch 8.0.0127v8.0.0127
Problem: Cancelling completion still inserts text when formatting is done for 'textwidth'. (lacygoill) Solution: Don't format when CTRL-E was typed. (Hirohito Higashi, closes #1312)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/edit.c b/src/edit.c
index 0d9e9d4a48..51a12b3301 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -3875,7 +3875,7 @@ ins_compl_prep(int c)
if (prev_col > 0)
dec_cursor();
/* only format when something was inserted */
- if (!arrow_used && !ins_need_undo)
+ if (!arrow_used && !ins_need_undo && c != Ctrl_E)
insertchar(NUL, 0, -1);
if (prev_col > 0
&& ml_get_curline()[curwin->w_cursor.col] != NUL)