[konsole] [Bug 464823] Soft hyphens are incorrectly displayed as normal spaces
Karl Ove Hufthammer
bugzilla_noreply at kde.org
Tue Jan 31 19:38:37 GMT 2023
https://bugs.kde.org/show_bug.cgi?id=464823
--- Comment #2 from Karl Ove Hufthammer <karl at huftis.org> ---
(In reply to Matan Ziv-Av from comment #1)
> This is an unintentional change of behaviour, but I am not sure it is a bug.
The character is shown as space. The Unicode standard specifies that is should
be invisible. I think that makes it a bug.
Here’s the relevant section in the latest version of the Unicode standard
(section 5.21) (earlier versions have similar text):
https://www.unicode.org/versions/Unicode15.0.0/ch05.pdf
U+00AD: soft hyphen has a null default appearance in the middle of a
line: the appearance of “ther[shy]apist” is simply “therapist”—no visible
glyph. In
line break processing, it indicates a possible intraword break. At any
intraword
break that is used for a line break—whether resulting from this character
or by
some automatic process—a hyphen glyph (perhaps with spelling changes) or
some other indication can be shown, depending on language and context.
> Do you edit text with a soft hyphen in konsole, or only view files?
Well, I *sometimes* edit text with soft hyphens in Konsole (or Yakuake, to be
precise). But *mostly* I use Kate or other text editors (or other software)
when editing text. I frequently *view* files (or application output) with soft
hyphens in Konsole/Yakuake.
> If you copy this text to the command line in konsole 22.08, you will see that this
> confuses bash and the cursor is displayed in the wrong place.
And that should be considered a bug. To clear up, the behaviour I would
*expect*, is the same behaviour as Kate (which also uses a monospace font by
default, and thus should be comparable) has. That is:
* The character should be invisible.
* When moving the cursor using the arrow keys, the soft hyphen should function
as if it were a normal (but zero-width) character. For example, if the cursor
is positioned right after the ‘e’ in ther[shy]apist, you need to press the
right arrow key three times (not two) to move it to right after the ‘a’. (The
first moves it to the right of the r, the second to the right of the soft
hyphen, and the third to the right of the a.)
* Regarding the display of the cursor: In Kate when the cursor is an ‘I beam’,
for the example above, the cursor moves to the right for the first key press,
doesn’t move horizontally for the next key press (which really moves it from
‘to the left of the soft hyphen’ to ‘to the right of the soft hyphen’), and
moves to the right for the third key press. If the cursor is a block (insert
mode), the current/selected character is shown with a blinking block behind.
(So if the soft hyphen is selected, the cursor is invisible. Perhaps a tiny bit
confusing, but it is consistent, as we‘re ‘highlighting’ an invisible
character.
(BTW, I am familiar with the arguments in Jukka Korpela‘s article 1997 article
on the soft hyphen, and even read it around the time it was originally written.
I don’t think it’s at all relevant now that the entire world has moved to
Unicode and uses Unicode semantics for all characters.)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list