Sunday, March 28, 2010

Re: Trying to suppress "--No files in buffer--" message within plugin

Hi Wincent!

On Sa, 27 Mär 2010, Wincent Colaiuta wrote:

> I'm trying to eliminate a little cosmetic glitch in the Command-T
> plugin (http://www.vim.org/scripts/script.php?script_id=3025), wherein
> the status line will show "--No files in buffer--" after a couple of
> files have been opened, and will only go away when the user provokes a
> redraw.

Do you mean --No lines in buffer--?

I noticed that behaviour, whenever I do :%d in a non-empty buffer.

> The strange thing is that the "--No files in buffer--" message doesn't
> appear the first time the plug-in displays, nor the second time, but
> it does on the third, fourth and all other subsequent times.

In one of my plugins I ran into the same problem. The issue was, the
first time, the new buffer was empty, so :%d did not output any spurious
message, only when reloading the buffer, this message appeared. This
drove me crazy. :silent %d_ was my solution eventually.

regards,
Christian

--
You received this message from the "vim_use" 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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: