Bug 444636 - Cannot copy selected text in diff panels until I switch to another window and back
Summary: Cannot copy selected text in diff panels until I switch to another window and...
Status: RESOLVED FIXED
Alias: None
Product: kdiff3
Classification: Applications
Component: application (show other bugs)
Version: 1.9.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: michael
URL:
Keywords:
: 453387 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-10-29 22:53 UTC by nyanpasu64
Modified: 2022-05-05 19:30 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nyanpasu64 2021-10-29 22:53:35 UTC
SUMMARY
If I select text in KDiff3's A/B/C panels, I cannot Ctrl+C or menu Edit->Copy until I switch to another window (or diff panel) and back.

STEPS TO REPRODUCE
1. Launch KDiff3 comparing two or three files.
2. Select text in the panels.
3. Try to copy text.

OBSERVED RESULT
You cannot copy (or cut) text until switching to another window and back (eg. minimizing and unminimizing KDiff3, alt-tab and back, or clicking another window and back). And once you do this, if you unselect text, the Copy menu item is mistakenly enabled until you switch windows and back.

If you click another diff panel and back, this also reloads the "can copy" status (and clears the selection in any diff panel you click).

If you *right-click* another diff panel and back, this properly reloads the "can copy" status to "is text selected in the current panel".

If you click another diff panel's *filename*, it sets the "can copy" status to true, but copying does nothing.

EXPECTED RESULT
The Copy and Cut actions reload their activation status whenever the (existence of a) selection in the current panel changes.

I'm not sure whether copying a selection should always look in the current panel, but I think that was the design intent.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.14-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2

ADDITIONAL INFORMATION
Comment 1 nyanpasu64 2022-02-07 05:33:52 UTC
Still happens on 1.9.4.
Comment 2 Attila 2022-03-21 11:52:02 UTC
Hi,

I can confirm this bug on Fedora 34 and also on 35.

Operating System: Fedora Linux 35
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.15-201.fc35.x86_64 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-4770T CPU @ 2.50GHz
Memory: 7.2 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 4600
Comment 3 michael 2022-03-24 13:50:58 UTC
Git commit 7551eefff2f4fe8d1f0b81f165a4788c0d684266 by Michael Reeves.
Committed on 24/03/2022 at 13:48.
Pushed by mreeves into branch 'master'.

Call slotUpdateAvailabities when selection is made
FIXED-IN:1.9.6

M  +2    -0    src/pdiff.cpp

https://invent.kde.org/sdk/kdiff3/commit/7551eefff2f4fe8d1f0b81f165a4788c0d684266
Comment 4 michael 2022-03-24 13:53:42 UTC
Git commit ae425759e18a6f075c427dd5ad7b28677d98509f by Michael Reeves.
Committed on 24/03/2022 at 13:52.
Pushed by mreeves into branch '1.9'.

Call slotUpdateAvailabities when selection is made
FIXED-IN:1.9.6
(cherry picked from commit 7551eefff2f4fe8d1f0b81f165a4788c0d684266)

M  +2    -0    src/pdiff.cpp

https://invent.kde.org/sdk/kdiff3/commit/ae425759e18a6f075c427dd5ad7b28677d98509f
Comment 5 michael 2022-05-05 19:30:17 UTC
*** Bug 453387 has been marked as a duplicate of this bug. ***