diff --git a/src/actions/Fold.ts b/src/actions/Fold.ts index fe8d783bae..6631d0814c 100644 --- a/src/actions/Fold.ts +++ b/src/actions/Fold.ts @@ -32,9 +32,9 @@ class FoldAction implements Action { await commands.executeCommand(this.command, { levels: 1, direction: "down", - selectionLines: targets.map( - (target) => target.selection.selection.start.line - ), + selectionLines: targets + .filter((target) => !target.selection.selection.isSingleLine) + .map((target) => target.selection.selection.start.line), }); // If necessary focus back original editor