File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -857,8 +857,9 @@ edit(
857857
858858 /* Pressing CTRL-Y selects the current match. When
859859 * compl_enter_selects is set the Enter key does the same. */
860- if (c == Ctrl_Y || (compl_enter_selects
861- && (c == CAR || c == K_KENTER || c == NL )))
860+ if ((c == Ctrl_Y || (compl_enter_selects
861+ && (c == CAR || c == K_KENTER || c == NL )))
862+ && stop_arrow () == OK )
862863 {
863864 ins_compl_delete ();
864865 ins_compl_insert (FALSE);
Original file line number Diff line number Diff line change @@ -420,6 +420,13 @@ func Test_complete_no_undo()
420420 call feedkeys (" u" , ' xt' )
421421 call assert_equal (' ' , getline (2 ))
422422
423+ call feedkeys (" ibbb\<Esc> 0" , ' xt' )
424+ call assert_equal (' bbb' , getline (2 ))
425+ call feedkeys (" A\<Right>\<Down>\<CR>\<Esc> " , ' xt' )
426+ call assert_equal (' January' , getline (2 ))
427+ call feedkeys (" u" , ' xt' )
428+ call assert_equal (' bbb' , getline (2 ))
429+
423430 iunmap <Right>
424431 set completeopt &
425432 q !
Original file line number Diff line number Diff line change @@ -779,6 +779,8 @@ static char *(features[]) =
779779
780780static int included_patches [] =
781781{ /* Add new patch number below this line */
782+ /**/
783+ 42 ,
782784/**/
783785 41 ,
784786/**/
You can’t perform that action at this time.
0 commit comments