Skip to content

Commit 3611fbf

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents a77a9b2 + cbd3bd6 commit 3611fbf

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/edit.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

src/testdir/test_popup.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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!

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ static char *(features[]) =
779779

780780
static int included_patches[] =
781781
{ /* Add new patch number below this line */
782+
/**/
783+
42,
782784
/**/
783785
41,
784786
/**/

0 commit comments

Comments
 (0)