From d733beb0be073656905147b6519afd9b25ad7f64 Mon Sep 17 00:00:00 2001 From: Tommy Allen Date: Mon, 17 Oct 2016 17:18:39 -0400 Subject: 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. --- src/nvim/edit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/nvim/edit.c') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index f4623615b9..61f84e21aa 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -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(); } -- cgit