https://bugs.kde.org/show_bug.cgi?id=513898
Bug ID: 513898
Summary: view.setVirtualCursorPosition: wrong behavior when
line contains tabs
Classification: Applications
Product: kate
Version First 25.12.0
Reported In:
Platform: openSUSE
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: scripting
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
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
--
You are receiving this mail because:
You are watching all bug changes.