mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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.
This commit is contained in:
@@ -857,8 +857,9 @@ edit(
|
|||||||
|
|
||||||
/* Pressing CTRL-Y selects the current match. When
|
/* Pressing CTRL-Y selects the current match. When
|
||||||
* compl_enter_selects is set the Enter key does the same. */
|
* compl_enter_selects is set the Enter key does the same. */
|
||||||
if (c == Ctrl_Y || (compl_enter_selects
|
if ((c == Ctrl_Y || (compl_enter_selects
|
||||||
&& (c == CAR || c == K_KENTER || c == NL)))
|
&& (c == CAR || c == K_KENTER || c == NL)))
|
||||||
|
&& stop_arrow() == OK)
|
||||||
{
|
{
|
||||||
ins_compl_delete();
|
ins_compl_delete();
|
||||||
ins_compl_insert(FALSE);
|
ins_compl_insert(FALSE);
|
||||||
|
@@ -420,6 +420,13 @@ func Test_complete_no_undo()
|
|||||||
call feedkeys("u", 'xt')
|
call feedkeys("u", 'xt')
|
||||||
call assert_equal('', getline(2))
|
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>
|
iunmap <Right>
|
||||||
set completeopt&
|
set completeopt&
|
||||||
q!
|
q!
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
42,
|
||||||
/**/
|
/**/
|
||||||
41,
|
41,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user