@lvce-editor/editor-worker 19.29.7 → 19.29.9
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 +8 -8
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -7087,16 +7087,19 @@ const goTo = async ({
|
|
|
7087
7087
|
return editor;
|
|
7088
7088
|
} catch (error) {
|
|
7089
7089
|
// TODO if editor is already disposed at this point, do nothing
|
|
7090
|
+
if (error === null || error === undefined) {
|
|
7091
|
+
const info = getWordAt$1(editor, rowIndex, columnIndex);
|
|
7092
|
+
const message = getNoLocationFoundMessage(info);
|
|
7093
|
+
return editorShowMessage(editor, rowIndex, columnIndex, message);
|
|
7094
|
+
}
|
|
7090
7095
|
if (isNoProviderFoundError(error)) {
|
|
7091
7096
|
const displayErrorMessage = getErrorMessage(error);
|
|
7092
|
-
|
|
7093
|
-
return editor;
|
|
7097
|
+
return editorShowMessage(editor, rowIndex, columnIndex, displayErrorMessage);
|
|
7094
7098
|
}
|
|
7095
7099
|
// @ts-ignore
|
|
7096
7100
|
// ErrorHandling.handleError(error, false)
|
|
7097
7101
|
const displayErrorMessage = getErrorMessage(error);
|
|
7098
|
-
|
|
7099
|
-
return editor;
|
|
7102
|
+
return editorShowMessage(editor, rowIndex, columnIndex, displayErrorMessage);
|
|
7100
7103
|
}
|
|
7101
7104
|
};
|
|
7102
7105
|
|
|
@@ -11381,10 +11384,7 @@ const getSelections2 = editorUid => {
|
|
|
11381
11384
|
};
|
|
11382
11385
|
const setSelections2 = async (editorUid, selections) => {
|
|
11383
11386
|
const editor = getEditor$1(editorUid);
|
|
11384
|
-
const newEditor =
|
|
11385
|
-
...editor,
|
|
11386
|
-
selections
|
|
11387
|
-
};
|
|
11387
|
+
const newEditor = setSelections$2(editor, selections);
|
|
11388
11388
|
const newEditorWithDerivedState = await updateDerivedState(editor, newEditor);
|
|
11389
11389
|
set$8(editorUid, editor, newEditorWithDerivedState);
|
|
11390
11390
|
};
|