SUMMARY When moving vertically through a wrapped line and the current column is close to the soft-wrap position, the caret will jump to the first column of the line below. This can cause the it to skip a line when moving down, or get "stuck" when moving up. STEPS TO REPRODUCE 1. Type: 123456 1234 123456789 12345 1234 12345 2. Adjust the window width so the text wraps to six lines. 3. Position the caret after the '6' in the third line. 4. Press the up key, up, up again, then down, then down, then down again. OBSERVED RESULT (Actual results may be depend on font and screen resolution. This was reproduced with Hack 9pt at 166dpi.) The second up keypress moves the caret to the start of line 2 instead of line 1. Moving up again doesn't cause the caret to move. When it moves down it returns to the original column on line 3. Then jumps over line 4. And the last down keypress moves it to the end of line 6. Furthermore, adding an extra space at the end of the line changes which column the bug occurs on. EXPECTED RESULT When the caret begins after the '8' of line three, the same sequence always result in the caret moving to a different line and the last column less than or equal to where it started. SOFTWARE/OS VERSIONS KDE Plasma Version: 5.19.1 KDE Frameworks Version: 5.71.0 Qt Version: 5.15.0 Kate version: 20.04.2 Kate Part version: 5.71.0 Arch Linux, Kernel version 5.7.2-arch1-1 Xorg version 1.20.8 ADDITIONAL INFORMATION Happens in KWrite as well. Which is to be expected.
Confirmed the moving down skips line 4 but not the moving up. Needs investigation.
I'd like to bump this, I ran into this bug recently and its very annoying.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/119
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/120
Git commit 80762d259b20373876db6a8622cf17329db7221c by Tom N Harris, on behalf of Pat Brown. Committed on 17/03/2021 at 03:20. Pushed by cullmann into branch 'master'. Restrict horizontal range of cursor to avoid unintentionally wrapping. When converting a x position to cursor column for a wrapped text line, the last column should not be used or else the cursor will jump to the next line. M +4 -0 src/render/katerenderer.cpp https://invent.kde.org/frameworks/ktexteditor/commit/80762d259b20373876db6a8622cf17329db7221c
*** Bug 318387 has been marked as a duplicate of this bug. ***