Neil Bird wrote:

>    With the noddy plugin ~/.vim/ftplugin/c/balloon.vim:
> 
> function! MyBalloonExpr()
>    redir => def
>    exe 'silent isearch /'.v:beval_text.'/'
>    redir END
>    return substitute(def,'^\_s*\(.\{-\}\)\_s*$', '\1', '')
> endfunction
> setlocal balloonexpr=MyBalloonExpr()
> setlocal ballooneval
> 
> 
>    Although it works a treat, the cursor appears to move down to the bottom 
> left (as if isearch were really going to output to the screen).  The actual 
> cursor location remains unchanged (so subsequent movement/edit is OK), just 
> the flashing locator is wrong.

I see the problem.  But while trying this Vim crashed.  After a bit of
debugging it appears that your isearch command takes so long that the
balloonexpr is invoked recursively.  I'll add some code to avoid that.

Nice idea, if only it wasn't so slow.  Note that "silent" should be
"silent!" to avoid an error when nothing is found.


>    As a side-note, I have noticed a few times, GTK & xterm, where vim7 fails 
> to redraw everything correctly.  Nothing repeatable, unfortunately.

If you can reproduce it, let me know.

-- 
hundred-and-one symptoms of being an internet addict:
26. You check your mail. It says "no new messages." So you check it again.

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