diff options
-rw-r--r-- | src/edit.c | 5 | ||||
-rw-r--r-- | src/testdir/test_popup.vim | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/edit.c b/src/edit.c index 53b43c485..776a420f2 100644 --- 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); diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index 38459b323..d037b7abd 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -420,6 +420,13 @@ func Test_complete_no_undo() call feedkeys("u", 'xt') call assert_equal('', getline(2)) + call feedkeys("ibbb\<Esc>0", 'xt') + call assert_equal('bbb', getline(2)) + call feedkeys("A\<Right>\<Down>\<CR>\<Esc>", 'xt') + call assert_equal('January', getline(2)) + call feedkeys("u", 'xt') + call assert_equal('bbb', getline(2)) + iunmap <Right> set completeopt& q! diff --git a/src/version.c b/src/version.c index 4902d69f0..3a2b1a5e0 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 42, +/**/ 41, /**/ 40, |