On 09-Mar-2011 10:37, tyru wrote:
> 1. vim -u NONE -i NONE
> 2. :echo strdisplaywidth("\<Tab>foo", 8)
> 
> It returns 11 but I expect that the return value is 3 ("foo").
> I'm getting something wrong?
> Default 'tabstop' value is 8, so strdisplaywidth("\<Tab>") returns 8.
> it is expected value, though.

11 = 8 (<Tab>) + 3 ("foo") is correct; the <Tab> occupies 8 display cells, and
is therefore included. The function is mostly used for visual alignment along
screen colums.

-- regards, ingo

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

Raspunde prin e-mail lui