On 02/09/11 22:12, Peter Slížik wrote:
Dear Tony, others,
I tried to explain all the possibilities I explored, and it seems that
I failed to state the core of the problem clearly.
:set statusline+=@%(\ %#ErrorMsg#[%{&ff!='unix'?&ff:''}]%*%)@
http://tinyurl.com/vim-statusline-unix
To simplify the code, it basically says:
set statusline += @ %#ErrorMsg# %{this evaluates to an empty string} %* @
If you look at the picture again, you'll see the expression actually produces:
@@%#ErrorMsg#<Space><Space>%*
I can't see any logical explanation of how the %#ErrorMsg# switch was
able to move from inbetween @'s to the right. Morever, the grouping
operators %( %) should have gotten rid of the %#ErrorMsg# completely.
In short, there are two red spaces after '@@' that should not be
there. I believe that is a bug in Vim.
Could you confirm?
Peter
Yes, I see what you mean (I didn't yet try to reproduce); but what I
proposed was to try something simpler, see if it worked as it was
supposed to, and complexify it by _small_ steps if it did, until we
could have a "good" case and a "bad" case that differed from each other
by as little as possible. This would have helped Bram to locate exactly
the part of the code which has the bug.
Best regards,
Tony.
--
Bubble Memory, n.:
A derogatory term, usually referring to a person's
intelligence. See also "vacuum tube".
--
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