Bug 455601

Summary: Ctrl+C&&Ctrl+V doesn't copy the new line character anymore
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: Fushan Wen <qydwhotmail>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph, eric1, waqar.17a
Priority: NOR Keywords: regression
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Fushan Wen 2022-06-19 10:36:47 UTC
SUMMARY
Previously Ctrl+C&&Ctrl+V is supposed to copy the whole line including the new line character, but now it doesn't copy the new line character anymore.


STEPS TO REPRODUCE
1. Type some text in Kate/KWrite/KDevelop
2. Ctrl+C&&Ctrl+V

OBSERVED RESULT
The current line is inserted in the cursor position, no new line is inserted.

EXPECTED RESULT
A new line is inserted

SOFTWARE/OS VERSIONS
Information for package ktexteditor:
------------------------------------
Repository     : @System
Name           : ktexteditor
Version        : 5.95.0git.20220618T102210~994e846-ku.14.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 3.6 MiB
Installed      : Yes
Status         : up-to-date
Source package : ktexteditor-5.95.0git.20220618T102210~994e846-ku.14.1.src
Upstream URL   : https://www.kde.org
Summary        : Embeddable text editor component
Comment 1 Christoph Cullmann 2022-06-19 15:52:01 UTC
Hmm, we did alter something with that, but for me still the line ending is copied.

See https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/377
Comment 2 Eric Armbruster 2022-06-19 16:33:52 UTC
I cannot reproduce this either.
Comment 3 Fushan Wen 2022-06-19 16:35:03 UTC
I have X11 HiDPI enabled. Is that related?
Comment 4 Waqar Ahmed 2022-06-19 20:02:46 UTC
Maybe there is some confusion, the comment says:

> The current line is inserted in the cursor position

I think it's not that "newline char(\n)" is not copied, rather that previously the copied line got inserted as a "new line" after the current one.
Comment 5 Eric Armbruster 2022-06-19 21:12:28 UTC
Thanks for clarifying, Waqar. I got indeed confused by this.
Comment 6 Christoph Cullmann 2022-06-19 21:51:06 UTC
Git commit 83e90c5eefe7fb901ee6dd20af74846cac597060 by Christoph Cullmann, on behalf of Fushan Wen.
Committed on 19/06/2022 at 21:51.
Pushed by cullmann into branch 'master'.

Revert "Do not move cursor when smart copying"

This reverts commit 7ecb3f2ccf4eb67ad3e9e98b1746e738424f30a1

M  +1    -1    src/view/kateview.cpp

https://invent.kde.org/frameworks/ktexteditor/commit/83e90c5eefe7fb901ee6dd20af74846cac597060