@lvce-editor/editor-worker 19.66.5 → 19.66.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editorWorkerMain.js +3 -6
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -12606,7 +12606,7 @@ const getLineCommentEdit = (rowIndex, line, lineComment) => {
|
|
|
12606
12606
|
};
|
|
12607
12607
|
};
|
|
12608
12608
|
|
|
12609
|
-
const getSelectedLineCommentEdits = (editor, lineComment) => {
|
|
12609
|
+
const getSelectedLineCommentEdits = (editor, lineComment, origin = ToggleBlockComment$1) => {
|
|
12610
12610
|
const {
|
|
12611
12611
|
lines,
|
|
12612
12612
|
selections
|
|
@@ -12640,7 +12640,7 @@ const getSelectedLineCommentEdits = (editor, lineComment) => {
|
|
|
12640
12640
|
rowIndex
|
|
12641
12641
|
},
|
|
12642
12642
|
inserted: [`${lineComment} `],
|
|
12643
|
-
origin
|
|
12643
|
+
origin,
|
|
12644
12644
|
start: {
|
|
12645
12645
|
columnIndex,
|
|
12646
12646
|
rowIndex
|
|
@@ -12677,10 +12677,7 @@ const editorToggleLineComment = async editor => {
|
|
|
12677
12677
|
if (!lineComment) {
|
|
12678
12678
|
return editor;
|
|
12679
12679
|
}
|
|
12680
|
-
const
|
|
12681
|
-
const cursorRowIndex = editor.selections[0];
|
|
12682
|
-
const line = getLine$1(textDocument, cursorRowIndex);
|
|
12683
|
-
const documentEdits = [getLineCommentEdit(cursorRowIndex, line, lineComment)];
|
|
12680
|
+
const documentEdits = getSelectedLineCommentEdits(editor, lineComment, LineComment);
|
|
12684
12681
|
return scheduleDocumentAndCursorsSelections(editor, documentEdits);
|
|
12685
12682
|
};
|
|
12686
12683
|
|