@lvce-editor/editor-worker 19.55.5 → 19.56.1
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 +7 -6
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -5909,10 +5909,10 @@ const applyDocumentEdits$1 = (editor, edits) => {
|
|
|
5909
5909
|
return scheduleDocumentAndCursorsSelections(editor, documentEdits);
|
|
5910
5910
|
};
|
|
5911
5911
|
|
|
5912
|
-
const applyEdit = async (editor, changes) => {
|
|
5912
|
+
const applyEdit = async (editor, changes, selectionChanges) => {
|
|
5913
5913
|
object(editor);
|
|
5914
5914
|
array(changes);
|
|
5915
|
-
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
5915
|
+
return scheduleDocumentAndCursorsSelections(editor, changes, selectionChanges);
|
|
5916
5916
|
};
|
|
5917
5917
|
|
|
5918
5918
|
// TODO maybe use a separate worker for bulk edits and bulk edit history
|
|
@@ -6418,7 +6418,7 @@ const handleBlur$1 = async editor => {
|
|
|
6418
6418
|
widgetRevision,
|
|
6419
6419
|
widgets: closeWidgetsMaybe(editor.widgets || [])
|
|
6420
6420
|
};
|
|
6421
|
-
if (!editor.modified) {
|
|
6421
|
+
if (!editor.modified || isUntitledFile(editor.uri)) {
|
|
6422
6422
|
return newEditor;
|
|
6423
6423
|
}
|
|
6424
6424
|
const autoSave = await get$3('files.autoSave');
|
|
@@ -13344,9 +13344,9 @@ const closeWidget2 = async (editorUid, widgetId, widgetName, unsetAdditionalFocu
|
|
|
13344
13344
|
const closeFind2 = async editorUid => {
|
|
13345
13345
|
await closeWidget2(editorUid, Find, 'FindWidget', 0);
|
|
13346
13346
|
};
|
|
13347
|
-
const applyEdits2 = async (editorUid, edits) => {
|
|
13347
|
+
const applyEdits2 = async (editorUid, edits, selectionChanges) => {
|
|
13348
13348
|
const editor = getEditor$1(editorUid);
|
|
13349
|
-
const newEditor = await applyEdit(editor, edits);
|
|
13349
|
+
const newEditor = await applyEdit(editor, edits, selectionChanges);
|
|
13350
13350
|
const newEditorWithDerivedState = await updateDerivedState(editor, newEditor);
|
|
13351
13351
|
set$8(editorUid, editor, newEditorWithDerivedState);
|
|
13352
13352
|
};
|
|
@@ -16166,7 +16166,7 @@ const wrapCommand = (fn, preservesTypingCoalescing = false) => async (uid, ...ar
|
|
|
16166
16166
|
set$8(otherUid, instance.oldState, synchronizedEditor);
|
|
16167
16167
|
}
|
|
16168
16168
|
}
|
|
16169
|
-
if (lines !== finalEditor.lines) {
|
|
16169
|
+
if (lines !== finalEditor.lines && !isUntitledFile(finalEditor.uri)) {
|
|
16170
16170
|
schedule(uid, token => saveAfterDelay(uid, token));
|
|
16171
16171
|
} else if (modified && !finalEditor.modified) {
|
|
16172
16172
|
dispose$2(uid);
|
|
@@ -16409,6 +16409,7 @@ const commandMap = {
|
|
|
16409
16409
|
'EditorCompletion.closeDetails': closeDetails$1,
|
|
16410
16410
|
'EditorCompletion.focusFirst': focusFirst$1,
|
|
16411
16411
|
'EditorCompletion.focusIndex': focusIndex$2,
|
|
16412
|
+
'EditorCompletion.focusLast': focusLast$1,
|
|
16412
16413
|
'EditorCompletion.focusNext': focusNext$2,
|
|
16413
16414
|
'EditorCompletion.focusPrevious': focusPrevious$1,
|
|
16414
16415
|
'EditorCompletion.handleEditorBlur': handleEditorBlur,
|