Ingo Karkat wrote:
> Hi Vim developers,
>
> I found a discrepancy between the two methods for custom insert-mode
> completion, 'completefunc' and complete(). The latter doesn't respect
> the ':set completeopt+=longest' setting; its completions always expand
> to the first match, not just the longest common text of matches. I
> see no reason for not observing that setting, and think that this is a
> bug in the complete() function.
No, this works as intended. The whole idea of complete() is that the
script has full control over the matches. If you want to return the
longest matching text, then pass that to complete().
'completefunc' and complete() are intentionally different. Otherwise we
could omit one of them.
--
>From "know your smileys":
C=}>;*{)) Drunk, devilish chef with a toupee in an updraft,
a mustache, and a double chin
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php