On 19:25 Sat 29 Jun     , [email protected] wrote:
> On Saturday, June 29, 2013 5:37:44 PM UTC-7, Marcin Szamotulski wrote:
> > Dear vim dev,
> > 
> > 
> > 
> > With the latest vim-7.3.1270 custom command completion is not working.
> > 
> > This is a simple test which fails:
> > 
> > 
> > 
> > fun! ComComp(a,b,c)
> > 
> >     return "aaa\nbbb\nccc"
> > 
> > endfun
> > 
> > com! -nargs=1 -complete=custom,ComComp Test :echo ':@'
> > 
> > 
> > 
> > Then ":Test ^D" does not show any results.
> > 
> > 
> > 
> > Best regards,
> > 
> > Marcin Szamotulski
> 
> Patch 1260 broke it.  I submitted it yesterday, but Bram seems to have added 
> some extra sauce to it to make it more robust which ended up doing the 
> opposite.  It's a simple fix, see below.
> 
> ---
>  src/ex_getln.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/ex_getln.c b/src/ex_getln.c
> index 18a708b..bf2c64a 100644
> --- a/src/ex_getln.c
> +++ b/src/ex_getln.c
> @@ -4379,11 +4379,6 @@ set_cmd_context(xp, str, len, col)
>      int                old_char = NUL;
>      char_u     *nextcomm;
> 
> -    /* Store the string here so that call_user_expand_func() can get to them
> -     * easily. */
> -    xp->xp_line = str;
> -    xp->xp_col = col;
> -
>      /*
>       * Avoid a UMR warning from Purify, only save the character if it has 
> been
>       * written before.
> @@ -4414,6 +4409,11 @@ set_cmd_context(xp, str, len, col)
>         while (nextcomm != NULL)
>             nextcomm = set_one_cmd_context(xp, nextcomm);
> 
> +    /* Store the cmdline/cursor position here so that call_user_expand_func()
> +     * can get to them easily. */
> +    xp->xp_line = str;
> +    xp->xp_col = col;
> +
>      str[col] = old_char;
>  }

Thanks, this patch indeed solves the problem.

Best regards,
Marcin

-- 
-- 
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/groups/opt_out.


Raspunde prin e-mail lui