Hirohito Higashi wrote: > Hi Bram and developers! > > 2016-9-4(Sun) 22:40:41 UTC+9 h_east: > > Hi Bram and developers, > > > > 2016-9-3(Sat) 21:52:42 UTC+9 Bram Moolenaar: > > > Hirohito Higashi wrote: > > > > > > > How to reproduce: > > > > - Prepare the following vim script file. > > > > $ cat sample1.vim > > > > function! Sample() > > > > return 'autocmd ' > > > > endfunction > > > > call feedkeys("i\<c-r>=Sample()\<CR>\<C-x>\<C-v>") > > > > > > > > - Run vanilla vim with execute above file. > > > > $ vim -Nu NONE -S sample1.vim > > > > > > > > > > > > Expected behavior (I think): > > > > Current line displayed `autocomd BufAdd` and popup menu is appeared. > > > > > > > > > > > > Actual behavior: > > > > completion is not performed. > > > > Below message diplayed in last line. > > > > "-- Command-line completion (^V^N^P) Pattern not found" > > > > > > > > > > > > Is this bug? > > > > I don't know. But I wrote a patch with a test. > > > > Please check an attached patch. > > > > > > Isn't the problem that the completion is using ccline, but when getting > > > there from insert mode it's never set? So ccline.cmdfirstc is "=" > > > because of the previous command. > > > > Okay. I would try to more investigate. > > Thanks. > > I had more investigate and update a patch. > Perhaps, you will accept an attached patch :-)
Hmm, this still has some unexpected dependency. How about this: when set_cmd_context() is called from ins_complete() pass a flag that means "do not using ccline". Then in set_cmd_context() skip the part that uses ccline. Oh well, I suppose I might as well do that then. And use your test, that's the bulk of the work. -- Did you ever see a "Hit any key to continue" message in a music piece? /// 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.