[konsole] [Bug 464823] Soft hyphens are incorrectly displayed as normal spaces

2023-02-23 Thread Kurt Hindenburg
https://bugs.kde.org/show_bug.cgi?id=464823

--- Comment #4 from Kurt Hindenburg  ---
Git commit feb44c226fc6ca8e57f37a189442474e63383688 by Kurt Hindenburg, on
behalf of Matan Ziv-Av.
Committed on 24/02/2023 at 00:46.
Pushed by hindenburg into branch 'master'.

Make behaviour of characters with problematic width configurable

Add a profile option to follow Unicode standard for the display width of
characters, where this width differs from glibc's wcwidth.

Currently the only character affected by this is soft hyphen (unicode 0x00ad).

Konsole generally follows wcwidth() function when determining the display
width of characters, since this is behaviour expected by libreadline, and
doing otherwise corrupts lines containing problematic characters. When such
characters are used more for display, then on the command line, following
the Unicode standard may be prefferable.

The default for this option is disabled - that is follow wcwidth().

M  +6-0doc/manual/index.docbook
M  +8-2src/Screen.cpp
M  +4-0src/Screen.h
M  +1-0src/profile/Profile.cpp
M  +4-0src/profile/Profile.h
M  +3-1src/session/SessionManager.cpp
M  +1-0src/terminalDisplay/TerminalDisplay.cpp
M  +16   -0src/widgets/EditProfileAppearancePage.ui
M  +8-0src/widgets/EditProfileDialog.cpp
M  +1-0src/widgets/EditProfileDialog.h

https://invent.kde.org/utilities/konsole/commit/feb44c226fc6ca8e57f37a189442474e63383688

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 464823] Soft hyphens are incorrectly displayed as normal spaces

2023-02-11 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=464823

--- Comment #3 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/utilities/konsole/-/merge_requests/812

-- 
You are receiving this mail because:
You are watching all bug changes.

[konsole] [Bug 464823] Soft hyphens are incorrectly displayed as normal spaces

2023-01-31 Thread Karl Ove Hufthammer
https://bugs.kde.org/show_bug.cgi?id=464823

--- Comment #2 from Karl Ove Hufthammer  ---
(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 watching all bug changes.

[konsole] [Bug 464823] Soft hyphens are incorrectly displayed as normal spaces

2023-01-27 Thread Matan Ziv-Av
https://bugs.kde.org/show_bug.cgi?id=464823

Matan Ziv-Av  changed:

   What|Removed |Added

 CC||ma...@svgalib.org

--- Comment #1 from Matan Ziv-Av  ---
This is an unintentional change of behaviour, but I am not sure it is a bug.

Do you edit text with a soft hyphen in konsole, or only view files? 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.

See some discussion here:
https://www.mail-archive.com/tech@openbsd.org/msg63271.html (and many other
places).

-- 
You are receiving this mail because:
You are watching all bug changes.