| Summary: |
Toggling comments on selected text that is separated with empty lines, works one way |
| Product: |
[Applications] kate
|
Reporter: |
Maciej Lebiest <szwendacz> |
| Component: |
general | Assignee: |
KWrite Developers <kwrite-bugs-null> |
| Status: |
RESOLVED
FIXED
|
|
|
| Severity: |
normal
|
CC: |
waqar.17a
|
| Priority: |
NOR
|
|
|
| Version First Reported In: |
22.04.1 | |
|
| Target Milestone: |
--- | |
|
| Platform: |
Fedora RPMs | |
|
| OS: |
Linux | |
|
|
Latest Commit:
|
https://invent.kde.org/frameworks/ktexteditor/commit/89c0b14fec9e42d12c1fcc5e60b5defece28a3e7
|
Version Fixed/Implemented In:
|
|
|
Sentry Crash Report:
|
|
| |
SUMMARY So the problem is with toggling comment with ctrl+/ shortcut. If selected text contains empty lines, then this shortcut will only add more levels of comment (in python adding more # ) , but it will not add comment on the empty line, nor will remove comment if whole text (except these empty lines) is already commented. STEPS TO REPRODUCE 1. Create .yml file containing yaml config with empty line: test: test2: - whatever another: another2: hello 2. select this whole text with mouse dragging over it 3. press ctrl+/ to comment/uncomment selected text multiple times OBSERVED RESULT Additional layers of comment are added to the text: ######test: ######test2: ######- whatever ######another: ######another2: hello EXPECTED RESULT Only one level of comment is made, and then removed with every second toggling. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora 36 KDE Plasma Version: 5.25.4 KDE Frameworks Version: 5.97.0 Qt Version: 5.15.5 ADDITIONAL INFORMATION If instead of selecting text with mouse dragging, i put on each line multicursor (leftAlt+click) and then use toogling comments, then it works as expected.