File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1514,8 +1514,8 @@ void CodeTextEditor::toggle_inline_comment(const String &delimiter) {
15141514 // Empty lines should not be counted.
15151515 bool is_empty = text_editor->get_line (line).strip_edges ().is_empty ();
15161516 is_all_empty = is_all_empty && is_empty;
1517- // `.left(1)` here because get_delimiter_start_key will return `##` instead of `#` when there is multiple comment delimiter in a line.
1518- if (!is_empty && (delimiter_idx == -1 || text_editor->get_delimiter_start_key (delimiter_idx).left ( 1 ) != delimiter)) {
1517+ // get_delimiter_start_key will return `##` instead of `#` when there is multiple comment delimiter in a line.
1518+ if (!is_empty && (delimiter_idx == -1 || ! text_editor->get_delimiter_start_key (delimiter_idx).begins_with ( delimiter) )) {
15191519 is_commented = false ;
15201520 break ;
15211521 }
You can’t perform that action at this time.
0 commit comments