[konsole] [Bug 402613] Unicode Playing Cards are cut off on the right (regression)
Mariusz Glebocki
bugzilla_noreply at kde.org
Fri Dec 28 01:22:26 GMT 2018
https://bugs.kde.org/show_bug.cgi?id=402613
Mariusz Glebocki <mglb at arccos-1.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mglb at arccos-1.net
--- Comment #8 from Mariusz Glebocki <mglb at arccos-1.net> ---
Created attachment 117139
--> https://bugs.kde.org/attachment.cgi?id=117139&action=edit
single width character as double width character demo
I've made a small demo. Konsole assumes ⛩ has width 2, zsh assumes it has width
1. What happens:
* The text is pasted - konsole writes it to zsh input buffer and on the screen.
Konsole places cursor after pasted text - 10 cells from the beginning.
* Backspace is pressed. For each press zsh removes last character from its
internal buffer, moves cursor 1 cell to the left (remember that for zsh each
used character takes 1 cell), and clears the cell.
* When all 9 characters are removed from the buffer, it ignores further
backspace presses, as there is nothing more to remove. The cursor moved 9 cells
to the left.
* 1 cell is not reachable - zsh assumes it moved to the starting position.
In second case 5 cells are cleared. For konsole the last cleared cell is an
unused cell, because the one to the left has double character in it. ⛩ is still
on the screen, but not in zsh buffer. This is visible after zsh redraw the text
using its buffer.
The problem does not exist when the program and Konsole agree about the width.
I understand people (including me) want to use various emojis and even custom
images stored in private use area, so I want to expand clipping area of all
characters to 2 cells, but only if the next cell is empty (has space). This
way:
* To use single-width character with double-width image, you'll type "⛩ ".
Konsole will draw the character on top of space, but will still assume there is
the single-width character and a space. The programs will assume the same.
* Regular characters just after too wide character won't be overpainted (as it
happens in e.g. vim when clipping is off). In this case the too wide character
will be clipped as it happens now.
This won't help with displaying text files (unless there are spaces after
emojis) or other text not controlled by the user, but will allow to use full
characters in prompts or scripts. I hope this is primary use case of graphical
characters in a terminal.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list