Cursor of multi-line edit is not aligned when there are spaces See Picture 1, the second line is not aligned because there is a line-ending See Picture 2, this area should be a simple rectangle, but it is ragged
Created attachment 178059 [details] Picture 1
Created attachment 178060 [details] Picture 2
Can you please fill out the steps to reproduce and the system info? It helps developers understand how to reproduce the issue and what underlying software e.g. Qt and KDE Frameworks are in use. Please change the status back to REPORTED when you reply with the requested information. Thank you. STEPS TO REPRODUCE 1. 2. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: KDE Plasma Version: KDE Frameworks Version: Qt Version:
can see the issue, but dont think it has anything to do with "spaces" or line endings.
seems like if the horizontalAdvance of a font has a fractional part, then the x calculation in KateRenderer::cursorToX is slightly off when the cursor is past the end of line. Tested with "Intel One Mono, Size:11"
Guess we could use like Qt there qreal in a more consistent way.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/787
Git commit fbf5a1d47ed5cb539c19427833405e164423c1b8 by Waqar Ahmed, on behalf of Christoph Cullmann. Committed on 17/02/2025 at 05:14. Pushed by waqar into branch 'master'. compute at least inside cursorToX with floats M +5 -8 src/render/katerenderer.cpp M +2 -2 src/render/katerenderer.h https://invent.kde.org/frameworks/ktexteditor/-/commit/fbf5a1d47ed5cb539c19427833405e164423c1b8