diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-10-17 20:47:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-10-17 20:47:02 +0200 |
commit | cbd3bd6cbed5baf418b037b17ad46e339ff59174 (patch) | |
tree | 67dfc5f3df411644c14127d4d19a2ec1889a1c3e /src/edit.c | |
parent | 869e35270ecffd9024958880cb03f6f0bb01ea93 (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.c | 5 |
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); |