Skip to content

Commit c9b5f34

Browse files
fix: uncommenting a block works when newline that only has spaces is also selected (#5642)
1 parent c291360 commit c9b5f34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/languageSupport/languages/flux/monaco.flux.hotkeys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function comments(editor: EditorType) {
3232
// if any of the lines in the selection is uncommented then toggle commenting on
3333
isTogglingCommentingOn = values
3434
.slice(startLineNumber - 1, endLineNumber)
35-
.some(v => !(v === '') && !isCommented(v)),
35+
.some(v => !(v.trim() === '') && !isCommented(v)),
3636
updatedValues = values.map((v, i) => {
3737
if (i < startLineNumber - 1 || i > endLineNumber - 1) {
3838
return v

0 commit comments

Comments
 (0)