Thursday, December 2, 2010

Re: function virtcol() doesn't return the expected value

H Xu wrote:

> Hi,
>
> The attachment is a picture which shows the cursor position.
> The cursor at the begin of the second "to" of line 1247 of
> editing.txt, which is a help file of vim.
> Then use ":echo virtcol('.')".
> While the expected value is 58, it shows 60.
>
> Is this my mistake or vim has done something wrong? Thanks.

I think that's the expected behavior. There are 2 concealed
characters on line 1247. Conceal feature affects how the
line is displayed but not the return value of functions such
as virtcol('.').

You can show the concealed char with: :set conceallevel=0

-- Dominique

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

Post a Comment