Yasuhiro Matsumoto wrote:
> When user complete function return like below...
>
> {"words": [...], "refresh": "always"}
>
> vim call user complete function again immediately. If the function return
> -1, completion will be canceled.
>
> For example,
> ----------
> int documentation;
> int document;
> ----------
>
> Type '/m<cr>cw'. When user complete function work on this time, and show
> following candidates:
> This is meaning: returned findstart=4, and return following:
>
> ----------
> {"words": ["documentation", "document"], "refresh": "always"}
> ----------
>
> When user type 'a' which is not match for candidates, it call user comlete
> function again.
> If user complete function return -1 for this, "." register will be broken.
>
> When 'a' was typed, ins_compl_addleader() is called.
> in ins_compl_addleader(), compl_leader is reset all times.
> But compl_leader must not reset for 'always'. 'always' re-call user
> complete function with findstart=1. So it break
> compl_col and curs_col. i.e. "." register will be broken.
>
> Patch is here: https://gist.github.com/1631857
> (https://raw.github.com/gist/1631857/gistfile1.diff)
>
> And I found a bug. When 'always' is returned and returned -1 for
> findstart=1, candidates will empty.
> Then, if type <c-n> key to select next item(or call feedkeys() to do that),
> vim crash in ins_compl_next().
Thanks for the patch. It's hard to say this is the best way to fix it.
Let's just include it and await the next bug...
--
Bad programs can be written in any language.
/// 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