Patch 8.0.0042 (after 8.0.0041)
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.
Files: src/edit.c, src/testdir/test_popup.vim
*** ../vim-8.0.0041/src/edit.c 2016-10-16 15:35:43.113173887 +0200
--- src/edit.c 2016-10-17 20:40:11.205738031 +0200
***************
*** 857,864 ****
/* 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)))
{
ins_compl_delete();
ins_compl_insert(FALSE);
--- 857,865 ----
/* 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)))
! && stop_arrow() == OK)
{
ins_compl_delete();
ins_compl_insert(FALSE);
*** ../vim-8.0.0041/src/testdir/test_popup.vim 2016-10-16 15:35:43.113173887
+0200
--- src/testdir/test_popup.vim 2016-10-17 20:33:32.300678084 +0200
***************
*** 420,425 ****
--- 420,432 ----
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!
*** ../vim-8.0.0041/src/version.c 2016-10-16 15:35:43.113173887 +0200
--- src/version.c 2016-10-17 20:43:35.744230520 +0200
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 42,
/**/
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.