diff src/edit.c @ 10291:d9bd03a0d70f v8.0.0042

commit https://github.com/vim/vim/commit/cbd3bd6cbed5baf418b037b17ad46e339ff59174 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 17 20:47:02 2016 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Mon, 17 Oct 2016 21:00:04 +0200
parents af5b6efad23f
children 0bf1d211e441
line wrap: on
line diff
--- 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);