Bug 482018 - Enable opening files at last cursor position
Summary: Enable opening files at last cursor position
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 24.02.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-29 12:48 UTC by eliasla
Modified: 2024-03-27 09:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eliasla 2024-02-29 12:48:21 UTC
SUMMARY:
Right now, if a file is closed, then opened again, kate dispalys the file at the top (line 0). It would be very useful if instead it scrolled to the last position of the cursor since document was last opened..


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 22.04
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Waqar Ahmed 2024-03-22 21:54:29 UTC
Seems to be a regression because of session auto save..
Comment 2 Romário Rios 2024-03-24 02:36:08 UTC
I just tested it on master and it's working for me. Can you give more information on this like KDE Gear, Frameworks, Qt versions? A more detailed test case? Custom configs?
Comment 3 Bug Janitor Service 2024-03-25 21:10:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1433
Comment 4 eliasla 2024-03-25 21:51:31 UTC
(In reply to Romário Rios from comment #2)
> I just tested it on master and it's working for me. Can you give more
> information on this like KDE Gear, Frameworks, Qt versions? A more detailed
> test case? Custom configs?

Thanks. Simply open a text file in Kate. Scroll to the middle. Select a word from a line in the middle. Close Kate, open again. The cursor is on the first line. I'm on ubuntu 22.04.
Comment 5 Christoph Cullmann 2024-03-27 09:50:56 UTC
Git commit d3e6cf7f8af1508ef066c12cc38eab78a6ccc763 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 27/03/2024 at 09:38.
Pushed by cullmann into branch 'master'.

Fix session autosave deletes view session config

We store view config whenever a view is closed in KateViewSpace. Session
autosave feature broke this because it wiped the saved config.

M  +14   -12   apps/lib/session/katesessionmanager.cpp
M  +2    -2    apps/lib/session/katesessionmanager.h

https://invent.kde.org/utilities/kate/-/commit/d3e6cf7f8af1508ef066c12cc38eab78a6ccc763