Hari Krishna Dara wrote:

> > > > > I have a command with custom completion function that employs the 
> > > > > :redir
> > > > > mechanism to determines the matches. This used to work fine in Vim6.3,
> > > > > but is broken in Vim7.0. I don't see any sandbox restrictions that 
> > > > > could
> > > > > apply in this case, but even if they do, the command for which I am
> > > > > redirecting the output itself is very simple, it is just an :echo on a
> > > > > simple string, something like this:
> > > > >
> > > > > :Echo delete
> > > > >
> > > > > and the command Echo is defined as
> > > > >
> > > > > :command! -complete=file -nargs=* Echo :echo <q-args>
> > > > >
> > > > > Is this a bug in Vim7 or some change that is not backwards compatible?
> > > > > What would be the change that caused this to break?
> > > >
> > > > You don't give enough information to write a meaningful reply.
> > >
> > > Sorry, I thought my description was complete enough, but anyway, here I
> > > extracted the code that breaks.
> > >
> > > command! -complete=file -nargs=* GUDebugEcho :echo <q-args>
> > > function! UserFileExpand(fileArgs)
> > >     return substitute(GetVimCmdOutput('GUDebugEcho ' . a:fileArgs),
> > > '^\_s\+\|\_s\+$', '', 'g')
> > > endfunction
> > >
> > > If UserFileExpand() is called from custom completion function, it no
> > > longer captures any output (this works fine in 6.3), but it works fine
> > > if you call from command line or scripts.
> 
> As Eric mentioned, the part that is "broken" is this and see below for
> the example correct/expected and incorrect/unexpected behavior. Please
> let me know if you need further clarification.

Please dig into this a bit more.  GetVimCmdOutput() is a long function,
what part of it doesn't work?    The ":redir" command is allowed in the
sandbox.Again, set 'verbose' to possibly see an error message.  And/or
add some "echomsg" commands to find out what is happening.

-- 
TIM: To the north there lies a cave,  the cave of Caerbannog, wherein, carved
     in mystic runes, upon the very living rock, the last words of Olfin
     Bedwere of Rheged make plain the last resting place of the most Holy
     Grail.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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    ///

Reply via email to