未验证 提交 8e7c52c9 编写于 作者: A Alexandru Dima 提交者: GitHub

Merge pull request #36652 from Markussss/sortLinesMultipleSelections

Added support for sorting multiple selections
......@@ -154,10 +154,15 @@ abstract class AbstractSortLinesAction extends EditorAction {
return;
}
var command = new SortLinesCommand(editor.getSelection(), this.descending);
var commands: ICommand[] = [];
var selections = editor.getSelections();
for (var i = 0; i < selections.length; i++) {
commands.push(new SortLinesCommand(selections[i], this.descending));
}
editor.pushUndoStop();
editor.executeCommands(this.id, [command]);
editor.executeCommands(this.id, commands);
editor.pushUndoStop();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册