Bug 447525 - Kate: navigation keys do not cancel mark
Summary: Kate: navigation keys do not cancel mark
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: Git
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 461623 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-26 07:05 UTC by Heinrich Schuchardt
Modified: 2022-11-09 20:03 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.91.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heinrich Schuchardt 2021-12-26 07:05:21 UTC
SUMMARY
Pressing a navigation key without CTRL does not cancel a mark.

STEPS TO REPRODUCE
I mark a piece of text in Kate with CTRL+DOWN key and press CTRL+C. When I now press the DOWN key (without CTRL) the mark is extended. I have to hit the ESC key to cancel the mark.

OBSERVED RESULT
I have to hit the ESC key to cancel the mark.

EXPECTED RESULT
Using a navigation key (UP, DOWN, LEFT, RIGHT, PAGE-UP, PAGE-DOWN, HOME, END) without CTRL should cancel a mark. This worked fine in prior releases of Kate and matches the behavior of other editors.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu Jammy (Linux 5.13.0-22)
(available in About System)
KDE Plasma Version: 5.89.0
KDE Frameworks Version: 5.89.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
n/a
Comment 1 Heinrich Schuchardt 2021-12-26 07:27:27 UTC
Could the trouble be caused by the following patch:

https://github.com/KDE/ktexteditor.git
Aleix Pol <aleixpol@kde.org>
5dce70a9693f8cce37f733b4687bb9b303376742
Do not cancel mouse selection when using the keyboard
Comment 2 Heinrich Schuchardt 2021-12-26 07:30:50 UTC
Said patch does not check if the selection is made by the mouse or by the keyboard. When selecting text using the keyboard the changed behavior is a major nuisance.
Comment 3 Christoph Cullmann 2022-01-08 16:52:58 UTC
Ok, that is bad :/

I brought it up again in the development ticket:

https://invent.kde.org/frameworks/ktexteditor/-/issues/11
Comment 4 Christoph Cullmann 2022-01-16 17:32:24 UTC
Git commit 3b31919427baf3da1ab1a24f682a4cefc7e5106f by Christoph Cullmann.
Committed on 16/01/2022 at 17:29.
Pushed by cullmann into branch 'master'.

Revert "Do not cancel mouse selection when using the keyboard"

This reverts commit 5dce70a9693f8cce37f733b4687bb9b303376742.

=> this leads to regressions

if somebody has time to properly reproduce and fix that, we can reapply
this, otherwise it is better to have some always working state without
this small usability improvement
Related: bug 446189

frameworks/ktexteditor#11

M  +10   -10   src/view/kateview.cpp
M  +0    -5    src/view/kateviewinternal.cpp
M  +0    -2    src/view/kateviewinternal.h

https://invent.kde.org/frameworks/ktexteditor/commit/3b31919427baf3da1ab1a24f682a4cefc7e5106f
Comment 5 Christoph Cullmann 2022-11-09 20:03:51 UTC
*** Bug 461623 has been marked as a duplicate of this bug. ***