SUMMARY view.setVirtualCursorPosition() puts the cursor in the wrong position if the line contains tabs. It seems like it attemps to compensate for that tabs should count as more than one character for this purpose, .but it adds the compensation instead of subtracting it. The counterpart view.virtualCursorPosition() seems to work fine. STEPS TO REPRODUCE 1. Set Indentation mode to Tabs. Set tab width to 4. 2. Enter this in the first line of a document: <TAB>123456789 3. Invoke a script that contains this code: view.setVirtualCursorPosition(0,4) OBSERVED RESULT The cursor is just before the 7. EXPECTED RESULT The cursor is just before the 1. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20251225 KDE Plasma Version: 6.5.4 KDE Frameworks Version: 6.21.0 Qt Version: 6.10.1 Kernel Version: 6.18.2-1-default (64-bit) Graphics Platform: X11
Sounds not correct on first glance, if you have interest to patch that, that is welcome.