Ticket #2291 (closed enhancement: fixed)
mcview: Half of a CJK character: Inconsistent replacement symbol used
Reported by: | egmont | Owned by: | |
---|---|---|---|
Priority: | trivial | Milestone: | 4.8.14 |
Component: | mcview | Version: | 4.7.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
In mcview view a file containing lots of CJK (double-width) characters. Turn off wordwrapping, and start scrolling horizontally.
When there's only a single cell on the right hand side, which is not enough to display the next CJK character, a replacement '>' symbol is displayed. When there's only a single cell at the beginning of the line, a space is shown instead.
I think these two should be consistent, e.g. either display space on both ends if there's not enough room for the CJK character, or '<' and '>'.
Attachments
Change History
Changed 14 years ago by egmont
- Attachment cjk_quick_brown.txt added
comment:2 Changed 13 years ago by andrew_b
- Branch state set to no branch
- Milestone changed from 4.7 to Future Releases
comment:4 Changed 10 years ago by egmont
The '>' sign is slang's choice when a CJK is printed in the rightmost column of the terminal. Ncurses uses a space instead.
When the viewer doesn't take up the whole width of the terminal (e.g. one of the file manager panels is in "Quick view" mode), such CJK characters overflow out of the viewer into the frame.
Obviously, both in wrap and unwrap mode, mcview should be clever enough never to print a CJK that would overflow from the actual viewer area.
In unwrap mode, we might choose to print '<' and '>' (or some other characters) for partial CJKs, but this should be explicit by mc, not implicit by slang.
Demo with many double-width characters