Hi ChrisBra, Bram and list,

2016-9-23(Fri) 0:34:35 UTC+9 Christian Brabandt:
> Hi,
> 
> On Mi, 21 Sep 2016, h_east wrote:
> >  func! Test_popup_complete2()
> > -  " Insert match immediately, if there is only one match
> > -  "  <c-e> Should select a character from the line below
> > -  " TODO: test disabled because the code change has been reverted.
> > -  throw "Skipped: Bug with <c-e> and popupmenu not fixed yet"
> > +  " 'the popup menu is not visible' is not equivalent to  'the completion 
> > mode
> > +  " is not active'.
> > +  " After the type <F5>, Vim still stay in the first state of the 
> > completion
> > +  " mode.  It is not related to the visible of popup.
> > +  " So that, the first <C-E> behavior is `complete_CTRL-E`, and the second 
> > and
> > +  " more <C-E> is `i_CTRL_E`
> 
> 
> How about this:
> Although the popupmenu is not visible, this does not mean completion 
> mode has ended. After pressing <f5> to complete the currently typed 
> char, Vim still stays in the first state of the completion
> (:h ins-completion-menu), although the popupmenu wasn't shown <c-e> will 
> remove the inserted completed text (:h complete_CTRL-E), while the 
> following <c-e> will behave like expected (:h i_CTRL-E)

Nicely. I like this. Thanks👍.

> 
> > -  call assert_equal(["December2015", "", "December2015"], getline(1,3))
> > +  call assert_equal(["Dece", "", "December2015"], getline(1,3))
> 
> Looks good to me.

Thanks for the check.
I update a patch.

Bram>
Please include this patch.

--
Best regards,
Hirohito Higashi (a.k.a. h_east)

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 6e07393..10eaf3a 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -17,16 +17,18 @@ func! ListMonths()
 endfunc
 
 func! Test_popup_complete2()
-  " Insert match immediately, if there is only one match
-  "  <c-e> Should select a character from the line below
-  " TODO: test disabled because the code change has been reverted.
-  throw "Skipped: Bug with <c-e> and popupmenu not fixed yet"
+  " Although the popupmenu is not visible, this does not mean completion mode
+  " has ended. After pressing <f5> to complete the currently typed char, Vim
+  " still stays in the first state of the completion (:h ins-completion-menu),
+  " although the popupmenu wasn't shown <c-e> will remove the inserted
+  " completed text (:h complete_CTRL-E), while the following <c-e> will behave
+  " like expected (:h i_CTRL-E)
   new
   inoremap <f5> <c-r>=ListMonths()<cr>
   call append(1, ["December2015"])
   :1
   call feedkeys("aD\<f5>\<C-E>\<C-E>\<C-E>\<C-E>\<enter>\<esc>", 'tx')
-  call assert_equal(["December2015", "", "December2015"], getline(1,3))
+  call assert_equal(["Dece", "", "December2015"], getline(1,3))
   %d
   bw!
 endfu

Raspunde prin e-mail lui