Bug 486648 - Removing all bookmarks not remembered
Summary: Removing all bookmarks not remembered
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (other bugs)
Version First Reported In: 24.02.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-05 22:37 UTC by Grósz Dániel
Modified: 2024-06-12 19:27 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grósz Dániel 2024-05-05 22:37:29 UTC
SUMMARY
Bookmarks are normally remembered after reopening a file. However, if I open a file with some bookmarks in it, remove all bookmarks, close the file, then open it again, the bookmarks are there again. It looks like if the set of bookmarks is empty, it doesn't overwrite the saved set of bookmarks. As such, it's impossible to get rid of all bookmarks in a straightforward way.

It happens in both Kate and KWrite if I close the file, leaving the application open, then reopen the file. If KWrite is used, or Kate is used with an anonymous session, it also happens if I close the whole application (with the file still open in it), then reopen it. With a named session in Kate, it doesn't happen if I close the application with the file still open, then reopen the session, but it does if I close the file explicitly, and then reopen it.

Removal of some bookmarks is remembered if not all bookmarks are removed.

STEPS TO REPRODUCE
0. Make sure Configure / Session / Keep meta-information past sessions is enabled.
1. Open a file.
2. Bookmark some line(s).
3. Close the file.
4. Open the file again.
5. Remove all bookmarks in the file.
6. Close the file.
7. Open the file again.

OBSERVED RESULT
The bookmarks that existed after Step 4 are there again.

EXPECTED RESULT
There are no bookmarks in the file.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240503
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.7-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Might be related to Bug 433006 (a crash when removing all bookmarks) or its fix.
Comment 1 Christoph Cullmann 2024-06-12 19:27:24 UTC
@bug_id = 486648
@bug_status = RESOLVED
@resolution = FIXED
@cf_commitlink = https://invent.kde.org/frameworks/ktexteditor/-/commit/8ddefd5a66ad51323732247851571306ee2f2bca

Git commit 8ddefd5a66ad51323732247851571306ee2f2bca by Christoph Cullmann.
Committed on 12/06/2024 at 19:24.
Pushed by cullmann into branch 'master'.

ensure we don't keep old session config keys

same behaviour as for the view

M  +3    -0    src/document/katedocument.cpp

https://invent.kde.org/frameworks/ktexteditor/-/commit/8ddefd5a66ad51323732247851571306ee2f2bca
Comment 2 Christoph Cullmann 2024-06-12 19:27:42 UTC
Fixed in frameworks 6.4.0