Saturday, July 24, 2010

Re: question about concealed items and %V in 'statusline'

Dominique Pelle wrote:

> My 'statusline' contains (among other things) %l,%c%V to show the
> position of the cursor. According to :help 'statusline' :
>
> l N Line number.
> c N Column number.
> V N Virtual column number as -{num}. Not displayed if equal to 'c'.
>
> The meaning of %l and %c is clear to me. But I'm wondering what
> "Virtual column" means now that we have concealed items in Vim-7.3.
>
> I see that if I put the cursor on a line with concealed items before the
> cursor, the %V does not show up (because it's identical to %c).
>
> For example, starting Vim-7.3b BETA (2397:0c8219a26bc9) with:
>
> $ vim -u NONE -c 'syntax on|filetype on|filetype plugin on' \
> -c 'set statusline=%l,%c%V' -c ':help' -c 'norm 3|'
>
> statusline in help window shows "1,3" (1st line, 3rd column). I'm
> wondering whether it should show "1,3-2" instead because of the
> concealed | character before the cursor.
>
> What is the expected behavior here?

The conceal feature only changes the displayed text, not the information
in the status line or the ruler.

You can expect some information to be at weird values. Also, currently
the cursor doesn't move when using "l" on a concealed item. I don't
expect these to be changed.

--
Snoring is prohibited unless all bedroom windows are closed and securely
locked.
[real standing law in Massachusetts, United States of America]

/// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///

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

No comments: