https://bugs.kde.org/show_bug.cgi?id=468495
Bug ID: 468495 Summary: KTextEditor (Kate, KWrite, KPart) new line on line start may eat text after tabs Classification: Frameworks and Libraries Product: frameworks-ktexteditor Version: 5.105.0 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kwrite-bugs-n...@kde.org Reporter: w01dn...@gmail.com Target Milestone: --- Created attachment 158098 --> https://bugs.kde.org/attachment.cgi?id=158098&action=edit Example file where bug manifests on 2nd&3rd lines SUMMARY If line has tab indentation (work code styling) then pressing enter on line start (before tabs) may eat some characters from meaningful part of the line (after tabs). I haven't discovered why it sometimes eats, sometimes keeps it fine. How much characters would be eaten depends on tab count and tab width, loos like: (tab count) * (tab width - 1). STEPS TO REPRODUCE 1. Create new file. 2. Add some text (2 lines is enough). 1-2. Or open file from attachment. 3. Place text cursor onto start of 2nd or 3rd line (1st isn't affected). 4. Press enter. OBSERVED RESULT New line without indentation is created and next line with indentation but meaningful part is corrupted — starting characters are dropped. EXPECTED RESULT New line without indentation and old line with indentation same as previous one. All meaningful characters preserved. SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE Tumbleweed 20230412 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.105.0 Qt Version: 5.15.8+kde185 ADDITIONAL INFORMATION All indentation modes are affected, but line has to start with tabs. Seems doesn't depend on programming language (noticed in javascript file, but regular text files affected too): 'Tools' → 'Indentation' → 'Normal'/'C Style' — were checked, both affected. -- You are receiving this mail because: You are watching all bug changes.