Bug 436906 - Do not include diffs created by kate in the list of recent files
Summary: Do not include diffs created by kate in the list of recent files
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 20.12.3
Platform: Other Other
: NOR normal (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-11 03:58 UTC by Podagric
Modified: 2021-05-13 14:27 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Podagric 2021-05-11 03:58:07 UTC
SUMMARY
When a file opened in kate is modified externally, kate allows to generate a diff of the change, and this works very well, the problem is that the diffs are displayed in the list of recently opened files.
Now imagine doing this several times a day, the history is polluted with many unnecessary files that don't even exist anymore.

STEPS TO REPRODUCE
1. Open or create a file in kate
2. Modify it externally
3. Go back to kate and create a diff of the modification

OBSERVED RESULT
The temporary file will now be in the history.
If this file were permanent, it would make sense to have it in that list, but it seems to me that as soon as the tab in which it is open is closed, the file is deleted. So it makes no sense to list it in the history and create an unnecessary distraction.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.11.16-zen1-1-zen
OS Type: 64-bit
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-4440 CPU @ 3.10GHz
Memory: 4 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4600
Comment 1 Nate Graham 2021-05-11 04:40:13 UTC
IIRC this is up to kate to mark them accordingly.
Comment 2 Méven Car 2021-05-11 05:37:27 UTC
I do reproduce it, you end up with *.diff files in your recent files menu.
Those diff files seem to be written to ~, I would expect them to be in /tmp .

Relevant commit :
https://invent.kde.org/utilities/kate/commit/c4b20b89954560a8abf1f49024d74a8559128851
Comment 3 Bug Janitor Service 2021-05-11 06:37:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/395
Comment 4 Podagric 2021-05-11 13:26:53 UTC
wow, that was fast.
thank you so much!
Comment 5 Christoph Cullmann 2021-05-13 11:43:08 UTC
Git commit edefa27760adc151d400c932ed88d5d942571080 by Christoph Cullmann, on behalf of Méven Car.
Committed on 13/05/2021 at 11:42.
Pushed by cullmann into branch 'master'.

Prevent storing diff files in recent files history

M  +3    -0    kate/katemainwindow.cpp
M  +1    -5    kate/katemwmodonhddialog.cpp
M  +3    -0    kate/katemwmodonhddialog.h
M  +7    -4    kate/kateviewmanager.cpp

https://invent.kde.org/utilities/kate/commit/edefa27760adc151d400c932ed88d5d942571080