2015-07-21 9:54 GMT+03:00 Yuri Vic <[email protected]>:
>> 1. are 1-wide
>> 2. the *font itself* is too wide.
>>
>>
>> So this problem has nothing to do with Vim.
>>
>>
>> To check whether it is the case, use terminal emulator which does not 
>> support fallback fonts or does not do it by default. E.g. rxvt-unicode (AKA 
>> urxvt) has this property (make sure that fallback font is not specified in X 
>> resource database: urxvt does not support automatic fallback driven by 
>> fontconfig configuration, but it has its own configuration with similar 
>> purpose). If in such terminal emulator the glyph you are referring to is 
>> shown as missing (usually as rectangle) and occupies exactly one display 
>> cell then I am right. If it is not there are two variants:
>>
>>
>> 1. There is something wrong in the font. Never saw this variant actually.
>> 2. Your Vim is using outdated unicode databases. (Note: they were recently 
>> updated to unicode-8.0.)
>
> Actually on my system (FreeBSD, kde konsole terminal) font doesn't support 
> this character, and it is shown as an "empty box" glyph. However, when the 
> cursor is over it, one box turns into two consecutive boxes. And when the 
> cursor is to the right, space gets added to this symbol and other letters 
> begin to jump in a strange way.
>
> So I don't think font has anything to do with it. Also vim package doesn't 
> depend on any unicode packages, last time I looked widths were hard-coded in 
> vim itself.

I forgot about the last case: your Vim has up-to-date widths, but your
terminal uses out-of-date. It was the case last time I tried to use
unicode-7.0 symbols: *before* Vim was update everything was fine
because both Vim and terminal were thinking that 1-wide character is
2-wide. *After* Vim was updated I had some similar visual bugs because
now Vim knew that character is 1-wide, but terminal still thought it
is 2-wide.

If *this* is the issue it will hit you even if your font does not have
needed glyph, and no fallback fonts (if any) have it also. When in
terminal, applications that care about width (*including* terminal
emulator itself, though it is the only thing that has other options)
have to determine it themselves. And because there are always at least
two applications: terminal and app like Vim there may be visual bugs
if their opinion about character widths is different.

To check whether Vim is right or wrong see output of
`strdisplaywidth(nr2char(0x1F44D))`. If it is the same as determined
by the Unicode standard (note: for some characters you need to take
&ambiwidth option into account, but this is not the case here) then it
is not Vim that contains a bug. Specifically for U+1F44D I can say
that

1. Python-3.4.1 thinks it has N (normal) width (1-wide). AFAIR it uses
unicode-7* standard.
2. Python-2.7.9 thinks it has F (full) width (2-wide). It uses some
earlier version of the standard.
3. Unicode-8.0.0 UCD defines it as N (literally: “1F400..1F579;N   #
So   [378] RAT..JOYSTICK” in
http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt).

So the right output of strdisplaywidth(nr2char(0x1F44D)) should be 1.

>
> Yuri
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui