@lvce-editor/editor-worker 19.71.3 → 19.71.4
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 +18 -0
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -12402,6 +12402,24 @@ const openRename = async editor => {
|
|
|
12402
12402
|
if (!word) {
|
|
12403
12403
|
return editor;
|
|
12404
12404
|
}
|
|
12405
|
+
const editorState = get$8(editor.uid);
|
|
12406
|
+
if (!editorState) {
|
|
12407
|
+
return editor;
|
|
12408
|
+
}
|
|
12409
|
+
const offsetAtCursor = getOffsetAtCursor$1(editor);
|
|
12410
|
+
const prepareRenameResult = await execute({
|
|
12411
|
+
args: [offsetAtCursor],
|
|
12412
|
+
editor,
|
|
12413
|
+
kind: 'rename',
|
|
12414
|
+
method: 'prepareRename'
|
|
12415
|
+
});
|
|
12416
|
+
if (!prepareRenameResult || typeof prepareRenameResult !== 'object') {
|
|
12417
|
+
return editor;
|
|
12418
|
+
}
|
|
12419
|
+
const latestEditor = get$8(editor.uid)?.newState;
|
|
12420
|
+
if (latestEditor !== editor) {
|
|
12421
|
+
return latestEditor || editor;
|
|
12422
|
+
}
|
|
12405
12423
|
const fullFocus = true;
|
|
12406
12424
|
let editorWithRenameWidget;
|
|
12407
12425
|
try {
|