ZyX wrote:

> Consider the following script:
> 
>     echo strwidth(nr2char(0x1F48E))
> 
> . It should display “2” because 0x1F48E is a fullwidth ruby symbol.
> But Vim actually displays “1”. This causes rendering bugs at least in
> terminal because unlike Vim terminal (Konsole) knows that ruby symbol
> occupies two display cells. Problem can be observed with the following
> script:
> 
>     vim -u NONE -i NONE -N --cmd 'set encoding=utf-8' -c 'call setline(".", 
> ["(" . nr2char(0xFF21) . ")", "(" . nr2char(0x1F48E) . ")"])' -c 'normal! G$'
> 
> . Display bug: 
> http://img-fotki.yandex.ru/get/15583/9151298.5/0_af494_e6a1fc7e_orig.png:
> 
>     (A)
>     (█☐)
> 
> (where third character on second line character is the inversed
> version of the first one: black box with white frame) with cursor on
> the third character on the second line in place of
> 
>     (A)
>     (𐟒Ž)
> 
> with cursor on the last parenthesis. Vim version is 7.4.540 (from 
> https://bitbucket.org/ZyX_I/vim/changeset/b96a442ce32c1747da2b07ca3410217ba2f38d8d).

Are these new Unicode characters?  Then we need to update the tables in
mbyte.c.  See the comment in utf_char2cells().  Or is this another
problem?

-- 
ARTHUR: I've said I'm sorry about the old woman, but from the behind you
        looked ...
DENNIS: What I object to is that you automatically treat me like an inferior...
ARTHUR: Well ... I AM king.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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