SUMMARY When reopening a file, kwrite remembers the cursor position but not the scrollbar position, placing the cursor at the top of the window. STEPS TO REPRODUCE 1. Create or open a file in kwrite that has more lines than kwrite's window height 2. Place the cursor close to the top of the file, scrolled so that it is in the middle of the window. 3. Close and reopen kwrite OBSERVED RESULT The cursor is now at the line you left it, but all the way at the top of the window. EXPECTED RESULT The scroll position should have been restored. Alternatively, the cursor should at least be in the middle of the window, so that context is visible in both directions. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 22.10 KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 ADDITIONAL INFORMATION
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/644
Git commit c8ed17734729b11e17447b3030a0a8214a98f512 by Christoph Cullmann, on behalf of Arthur Tadier. Committed on 14/12/2023 at 19:11. Pushed by cullmann into branch 'master'. Remember scroll position in session Unlike the cursor position, the scroll position is not saved in a session, which means the cursor will be placed at the top of the view instead of wherever it was last located. Save the last scroll position in a config entry as well. M +11 -1 src/view/kateview.cpp https://invent.kde.org/frameworks/ktexteditor/-/commit/c8ed17734729b11e17447b3030a0a8214a98f512