Reply to message «Re: [BUG] Passing special characters to &listchars and 
&fillchars causes screen corruption», 
sent 18:17:32 06 August 2011, Saturday
by Tony Mechelynck:

> The bug, if there is one, is that
> 
>       :set list lcs=nbsp:\x0D
> 
> (with a non-printable character) does not generate an error (I get "E474
> Invalid argument", which IMO is no bug.)
Yes, error is the desired behavior. It is not generated in my case (you missed 
that these quotes are $'...', not '...', so it is `:set list lcs=nbsp:^M', 
equivalent to `set list|let &lcs="nbsp:\x0D"').

I tested on vim-7.3.269 from mercurial repository with huge features, gui and 
perl, tcl, lua, ruby and python3 support.

> but even temporarily trying to set only
> 
>       :set list=\x0D
You can't set boolean arguments this way, so I don't understand what is this 
remark for.

Original message:
> On 06/08/11 15:31, ZyX wrote:
> > Consider the following code:
> >      vim -u NONE -c $'set list lcs=nbsp:\x0D' \
> >      
> >                  -c $'normal! i\u00A0\u00A0\u00A0a\e'
> > 
> > You will see cursor placed on the second virtual `M' (from `^M'), but
> > `ga' will show that you are on the letter `a'. Passing special
> > characters to `tab' suboption causes more corruption, but is less
> > reproducible. With fillchars results are better: highlighting partially
> > disappears, but that's all (tested only with vert and stl).
> 
> That code is invalid, see :help 'listchars'
> 
>       UTF-8 characters can be used when 'encoding' is "utf-8",
>       otherwise only printable characters are allowed. All characters
>       must be single width
> 
> I suppose a more adequate formulation would be:
> 
>       Only single-width printable characters are allowed.
>       Multibyte characters are allowed only if 'encoding' is "utf-8".
> 
> The bug, if there is one, is that
> 
>       :set list lcs=nbsp:\x0D
> 
> (with a non-printable character) does not generate an error (I get "E474
> Invalid argument", which IMO is no bug.)
> 
> I'm on gvim 7.3.269, Huge build with GTK2/Gnome GUI, under utf-8
> 'encoding'. My "usual" 'list'/'listchars' setting is
> 
>       :set list lcs=eol:¶,tab:\|_,nbsp:~,conceal:*
> 
> but even temporarily trying to set only
> 
>       :set list=\x0D
> 
> gives me the above-mentioned error, and 'listchars' is not modified.
> 
> 
> Best regards,
> Tony.

Attachment: signature.asc
Description: This is a digitally signed message part.

Raspunde prin e-mail lui