Bug 446655 - Text selection is broken if the selected text contains both English and non-English characters (character moves back and forth)
Summary: Text selection is broken if the selected text contains both English and non-E...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: font (show other bugs)
Version: master
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-12-08 01:57 UTC by Fushan Wen
Modified: 2021-12-08 07:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2021-12-08 01:57:54 UTC
SUMMARY
The characters become jumpy if the selected text contains both English and non-English characters.


STEPS TO REPRODUCE
1. Run `echo "hello world 你好 世界"`
2. Try to select the output line

OBSERVED RESULT
Non-English characters move back and forth, making it difficult to control the selection.

EXPECTED RESULT
All characters remain steady in their original places.

SOFTWARE/OS VERSIONS
Information for package konsole:
--------------------------------
Repository     : unstable-kde-applications
Name           : konsole
Version        : 22.03.70git.20211203T171311~6138b5470-ku.68.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 615.3 KiB
Installed      : Yes
Status         : up-to-date
Source package : konsole-22.03.70git.20211203T171311~6138b5470-ku.68.1.src
Summary        : KDE Terminal
Comment 1 Fushan Wen 2021-12-08 02:53:47 UTC
Bisected at https://invent.kde.org/utilities/konsole/-/merge_requests/528
Comment 2 Bug Janitor Service 2021-12-08 03:19:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/547
Comment 3 Fushan Wen 2021-12-08 07:07:50 UTC
Git commit f3d43ae3cf02988b49c67ec6057e19931baaeedc by Fushan Wen.
Committed on 08/12/2021 at 07:03.
Pushed by fusionfuture into branch 'master'.

TerminalPainter: Pass nextPos to hasSameWidth

This avoids jumpy selections when the text contains both English and
non-English characters.

M  +1    -1    src/terminalDisplay/TerminalPainter.cpp

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