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.
--
"I never met a piece of chocolate I didn't like."
--
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