https://bugs.kde.org/show_bug.cgi?id=451471
Bug ID: 451471 Summary: Toggle comment for Python code no longer works if leading whitespace is present Product: frameworks-ktexteditor Version: 5.91.0 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kwrite-bugs-n...@kde.org Reporter: c...@horwell.me Target Milestone: --- Created attachment 147481 --> https://bugs.kde.org/attachment.cgi?id=147481&action=edit ZIP containing two GIFs demonstrating the issue (5.90 vs 5.91) SUMMARY Since the release of ktexteditor 5.91.0, the "toggle comment" feature no longer works on Python code where whitespace is present at the start of the selection. For example, when an empty new line is included above the block, or selecting multiple lines which are indented. Affects KWrite, Kate and KDevelop. Downgrading to 5.90.0 restores the expected behaviour. STEPS TO REPRODUCE 1. In a Python document, select multiple lines which are indented (an example of leading whitespace on a line) 2. Press CTRL+/ to toggle the comment. OBSERVED RESULT Toggling comments only ever comments, and does not uncomment. Please observe the attached zip of GIFs demonstrating this. EXPECTED RESULT The line would be commented and uncommented. ADDITIONAL INFORMATION According to a git bisect, the problematic commit starts at: 690e16d5e06477d5f504d1ab89c760cb0cdcf4ff "Fix comment toggling when all lines in selection aren't commented" https://invent.kde.org/frameworks/ktexteditor/-/commit/690e16d5e06477d5f504d1ab89c760cb0cdcf4ff SOFTWARE/OS VERSIONS OS: Arch Linux KDE Plasma Version: 5.91.0 KDE Frameworks Version: 5.91.0 Qt Version: 5.15.3 -- You are receiving this mail because: You are watching all bug changes.