Christian Brabandt wrote:

> On Sa, 23 Jul 2016, Christian Brabandt wrote:
> 
> > Hm, that works when using <Ctrl-N>, but not when using, e.g.
> > calling the completion menu like this:
> > 
> > inoremap <f5> <c-r>=ListMonths()<cr>
> > 
> > Then <BS> will always end the completion menu and remove the last 
> > letter.
> > 
> > I did not think, that there is a difference depending on how the 
> > completion menu is called. This might be a bug.
> 
> I am still not sure how to handle this. 
> 
> > I think I also found a bug, and this makes the test currently fail.
> > Take this example from the test:
> > 
> > (The popupmenu is the one from the help for all months)
> > The initial state of the buffer is this:
> > ,----
> > | D
> > | December2015
> > `----
> > 
> > (cursor at D, press <f5><c-e><c-e><c-e><c-e><enter>)
> > 
> > Now if you want to complete the letter D this should only complete to 
> > December, since all other values do not match it and therefore it should 
> > be completed immediately to December and no menu shown. Therefore, 
> > pressing <C-e> afterwards should select the letter from below the 
> > cursors line, so it should complete to "December2015" if you press <c-e> 
> > 4 times, then there should be a new line because of the enter and then 
> > the "December2015" should be shown. So in the end, the buffer should 
> > look like this:
> > 
> > ,----
> > | December2015
> > | 
> > | December2015
> > `----
> > 
> > For whatever reason, doing it interactively, this results in:
> > 
> > ,----
> > | Dece
> > | 
> > | December2015
> > `----
> 
> Attached patch fixes this. Not sure, this is the best way. I basically 
> test, when the current key is <c-e> that the popupmen is still visible 
> and if not, handle it like a normal <c-e> character. This fixes at least 
> the test.

Thanks.  Not sure about the best either.  The insert mode completion is
a bit of a mess...

-- 
It might look like I'm doing nothing, but at the cellular level
I'm really quite busy.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui