[patch] Regression: East Asian Ambiguous Width Character is no longer displayed correctly from patch 8.0.0543

62 views
Skip to first unread message

h_east

unread,
Apr 18, 2017, 8:26:48 AM4/18/17
to vim_dev
Hi Bram and list,

At this point, it's only on the Terminal App and iTerm2 of macOS that I can confirm this phenomenon.

Preparation for repro.:
- Terminal settings:
- encoding: utf-8
- Unicode East Asian Ambiguous Character width: Wide

How to reproduce:
Run vanilla Vim with some options in Terminal App on macOS.
- vim -Nu NONE --cmd "set enc=utf-8" -c "set ambw=double"
Note: This Vim build configure is "Huge and without GUI".

- Paste the following character (U+25BC) in insert mode.


Expected behavior:
- The above characters are correctly displayed.

Actual behavior:
- Does not displayed properly.


NOTE:
- Vim 8.0.0542 displayed this correctly.
- Vim 8.0.0543 does not. (Also 8.0.0566)


In 8.0.0542, function may_req_ambiguous_char_width() is not included judgment of `starting == 0`.
But, 8.0.0543 is included.
So I remove this judgement.

Check attached patch.
I don't know this is the best solution.

--
Best regards,
Hirohito Higashi (h_east)
fix_ambiwidth_behavior.patch

Bram Moolenaar

unread,
Apr 18, 2017, 12:53:20 PM4/18/17
to vim...@googlegroups.com, h_east
Removing the check for "starting" is tricky, it may send control
sequences at the wrong moment. The call to the function is too early,
when "starting" is still non-zero. Let's move the calls down. Please
check it works for you after that patch.

--
Shit makes the flowers grow and that's beautiful

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

R0b0t1

unread,
Apr 19, 2017, 1:00:21 AM4/19/17
to vim...@googlegroups.com
On Tue, Apr 18, 2017 at 7:26 AM, h_east <h.eas...@gmail.com> wrote:
> - Paste the following character (U+25BC) in insert mode.
> ▼
>
> Expected behavior:
> - The above characters are correctly displayed.
>
> Actual behavior:
> - Does not displayed properly.

How does it fail to display? On rxvt-unicode the character is cut off
as it seems to be wider than the set of commonly displayed glyphs.

h_east

unread,
Apr 19, 2017, 1:52:17 AM4/19/17
to vim_dev
Hi R0b0t1,

2017-4-19(Wed) 14:00:21 UTC+9 R0b0t1:
> On Tue, Apr 18, 2017 at 7:26 AM, h_east wrote:
> > - Paste the following character (U+25BC) in insert mode.
> > ▼
> >
> > Expected behavior:
> > - The above characters are correctly displayed.
> >
> > Actual behavior:
> > - Does not displayed properly.
>
> How does it fail to display? On rxvt-unicode the character is cut off
> as it seems to be wider than the set of commonly displayed glyphs.

Nothing displayed.
Probably, it is displayed with halfwidth.
And I think that the Japanese font I am using does not have halfwidth data of the above characters.

h_east

unread,
Apr 19, 2017, 6:52:07 AM4/19/17
to vim_dev, h.eas...@gmail.com
Hi Bram,

2017-4-19(Wed) 1:53:20 UTC+9 Bram Moolenaar:
Vim 8.0.0567 works fine for me. Thanks!
Reply all
Reply to author
Forward
0 new messages