@lvce-editor/editor-worker 18.1.0 → 18.2.0
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 +21 -1
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -8159,7 +8159,27 @@ const setSelections = (editor, selections) => {
|
|
|
8159
8159
|
|
|
8160
8160
|
const setText = (editor, text) => {
|
|
8161
8161
|
string(text);
|
|
8162
|
-
|
|
8162
|
+
const endRowIndex = editor.lines.length - 1;
|
|
8163
|
+
const endColumnIndex = editor.lines.at(-1).length;
|
|
8164
|
+
const start = {
|
|
8165
|
+
columnIndex: 0,
|
|
8166
|
+
rowIndex: 0
|
|
8167
|
+
};
|
|
8168
|
+
const end = {
|
|
8169
|
+
columnIndex: endColumnIndex,
|
|
8170
|
+
rowIndex: endRowIndex
|
|
8171
|
+
};
|
|
8172
|
+
const changes = [{
|
|
8173
|
+
deleted: getSelectionText(editor, {
|
|
8174
|
+
end,
|
|
8175
|
+
start
|
|
8176
|
+
}),
|
|
8177
|
+
end,
|
|
8178
|
+
inserted: splitLines(text),
|
|
8179
|
+
origin: EditorType,
|
|
8180
|
+
start
|
|
8181
|
+
}];
|
|
8182
|
+
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
8163
8183
|
};
|
|
8164
8184
|
|
|
8165
8185
|
const create$1 = () => {
|