SUMMARY When Kate is set to append a newline to a file on save and the cursor is currently at the end of the file, the cursor moves to the next line when the user saves the file. STEPS TO REPRODUCE 1. Make sure Settings > Configure Kate> Open/Save > 'Append newline at end of file on Save' is enabled 2. Open any existing text file in Kate 3. Type something on the empty last line 4. Place the cursor at the end of the newly typed last line 5. Press Ctrl+S (save) OBSERVED RESULTS Cursor is automatically moved to the newline that was inserted after the last line EXPECTED RESULTS Cursor should not be automatically moved when the user saves a file SOFTWARE VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.93.0 Qt Version: 5.15.3 Kernel Version: 5.15.36-1-lts (64-bit) Graphics Platform: X11
https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/360
Git commit a1b91bacd3b919c41c68b3aed79577d2408e9564 by Christoph Cullmann. Committed on 02/05/2022 at 05:34. Pushed by cullmann into branch 'master'. avoid cursor move on insert of line at EOF on save M +16 -0 src/document/katedocument.cpp https://invent.kde.org/frameworks/ktexteditor/commit/a1b91bacd3b919c41c68b3aed79577d2408e9564