Summary: | Toggle Comment should add comment markers when only part of the selection is comment | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-ktexteditor | Reporter: | Grósz Dániel <groszdanielpub> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate, waqar.17a |
Priority: | NOR | Keywords: | usability |
Version: | 5.90.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/ktexteditor/commit/690e16d5e06477d5f504d1ab89c760cb0cdcf4ff | Version Fixed In: | 5.91 |
Sentry Crash Report: |
Description
Grósz Dániel
2020-09-26 03:24:50 UTC
Can confirm, this slightly bugs me too. As a workaround you can use the "Add comment" action (bound to Ctrl+D) instead of "Toggle comment". A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/260 Git commit 690e16d5e06477d5f504d1ab89c760cb0cdcf4ff by Waqar Ahmed. Committed on 21/01/2022 at 06:26. Pushed by waqar into branch 'master'. Fix comment toggling when all lines in selection aren't commented Old behaviour: When all lines in the selection aren't commented, toggling would uncomment the commented lines in selection and stop. Pressing toggle again would comment everything. New behaviour: If all lines are commented => uncomment all on toggle If some lines are commented => comment all (recommenting commented lines) The new behaviour is consistent with rest of the editors (QtCreator / VSCode) M +35 -16 src/document/katedocument.cpp M +1 -1 src/document/katedocument.h https://invent.kde.org/frameworks/ktexteditor/commit/690e16d5e06477d5f504d1ab89c760cb0cdcf4ff |