Ken Takata wrote:
> Typing Ctrl-N/P once in insert mode doesn't show up the first completion > candidate immediately since 8.1.0768. > Before that patch, the first candidate is shown immediately after typing > Ctrl-N/P, then the popup menu is shown after a few seconds (if there are many > candidates). After that patch, the first candidate is shown at the same time > as the popup menu is shown. So, it takes a few seconds to show the first > candidate. > > It seems that update_screen(0) is required for showing the first candidate. > How about this patch? > > --- a/src/edit.c > +++ b/src/edit.c > @@ -5023,7 +5023,10 @@ ins_compl_next( > > // Redraw before showing the popup menu to show the user what was > // inserted. > - pum_call_update_screen(); > + if (pum_enough_matches()) > + pum_call_update_screen(); > + else > + update_screen(0); > > /* display the updated popup menu */ > ins_compl_show_pum(); > > > Thanks to h-east and mattn for helping debugging. Ah, thus when there is one match the popup menu isn't displayed, but the match also isn't displayed. Your solution looks good. There is still another problem that the popup menu isn't displayed after searching the current file, making it slow when there are many buffers. That's an older problem though. -- "When I die, I want a tombstone that says "GAME OVER" - Ton Richters /// 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.
