diff options
author | Tommy Allen <tommy@esdf.io> | 2016-10-17 17:18:39 -0400 |
---|---|---|
committer | Tommy Allen <tommy@esdf.io> | 2016-10-22 15:15:27 -0400 |
commit | d733beb0be073656905147b6519afd9b25ad7f64 (patch) | |
tree | b73023e8f10f00e05ae15825673ff99c4620e2b4 /src | |
parent | c377c8be6185f0773163c915d3caf0862bc26f53 (diff) | |
download | rneovim-d733beb0be073656905147b6519afd9b25ad7f64.tar.gz rneovim-d733beb0be073656905147b6519afd9b25ad7f64.tar.bz2 rneovim-d733beb0be073656905147b6519afd9b25ad7f64.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/edit.c | 7 |
1 files changed, 4 insertions, 3 deletions
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(); } |