summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-10-17 20:47:02 +0200
committerBram Moolenaar <Bram@vim.org>2016-10-17 20:47:02 +0200
commitcbd3bd6cbed5baf418b037b17ad46e339ff59174 (patch)
tree67dfc5f3df411644c14127d4d19a2ec1889a1c3e /src/edit.c
parent869e35270ecffd9024958880cb03f6f0bb01ea93 (diff)
patch 8.0.0042v8.0.0042
Problem: When using Insert mode completion with 'completeopt' containing "noinsert" change is not saved for undo. (Tommy Allen) Solution: Call stop_arrow() before inserting for pressing Enter.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/edit.c b/src/edit.c
index 53b43c485a..776a420f27 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -857,8 +857,9 @@ edit(
/* Pressing CTRL-Y selects the current match. When
* compl_enter_selects is set the Enter key does the same. */
- if (c == Ctrl_Y || (compl_enter_selects
- && (c == CAR || c == K_KENTER || c == NL)))
+ if ((c == Ctrl_Y || (compl_enter_selects
+ && (c == CAR || c == K_KENTER || c == NL)))
+ && stop_arrow() == OK)
{
ins_compl_delete();
ins_compl_insert(FALSE);