vim-patch:8.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.
This commit is contained in:
Tommy Allen
2016-10-17 17:18:39 -04:00
parent c377c8be61
commit d733beb0be

View File

@@ -664,9 +664,10 @@ static int insert_execute(VimState *state, int key)
// Pressing CTRL-Y selects the current match. When
// compl_enter_selects is set the Enter key does the same.
if (s->c == Ctrl_Y
|| (compl_enter_selects
&& (s->c == CAR || s->c == K_KENTER || s->c == NL))) {
if ((s->c == Ctrl_Y
|| (compl_enter_selects
&& (s->c == CAR || s->c == K_KENTER || s->c == NL)))
&& stop_arrow() == OK) {
ins_compl_delete();
ins_compl_insert();
}