@lvce-editor/main-area-worker 9.68.1 → 9.68.3
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/mainAreaWorkerMain.js +18 -4
- package/package.json +1 -1
|
@@ -2906,6 +2906,15 @@ const focus = async state => {
|
|
|
2906
2906
|
if (typeof editorUid !== 'number' || editorUid < 0) {
|
|
2907
2907
|
return state;
|
|
2908
2908
|
}
|
|
2909
|
+
if (activeTab?.tab.uri?.startsWith('search-editor://')) {
|
|
2910
|
+
if (isConnected()) {
|
|
2911
|
+
await invoke$1(state.applicationId, 'Layout.renderMainAreaPending', state.uid);
|
|
2912
|
+
await invoke('Viewlet.focus', editorUid);
|
|
2913
|
+
} else {
|
|
2914
|
+
await invoke$2('Viewlet.focus', editorUid);
|
|
2915
|
+
}
|
|
2916
|
+
return state;
|
|
2917
|
+
}
|
|
2909
2918
|
const selector = activeTab?.tab.terminal ? '.xterm-helper-textarea' : '[name="editor"]';
|
|
2910
2919
|
if (isConnected()) {
|
|
2911
2920
|
await invoke$1(state.applicationId, 'Layout.renderMainAreaPending', state.uid);
|
|
@@ -5552,13 +5561,18 @@ const shouldRetryExistingTab = (existingTab, editorInput, forceOpen) => {
|
|
|
5552
5561
|
return existingTab.tab.loadingState === 'error' || forceOpen && existingTab.tab.loadingState === 'large' || editorInput.type === 'editor' && editorInput.forceText === true && existingTab.tab.editorInput?.type === 'binary';
|
|
5553
5562
|
};
|
|
5554
5563
|
const getViewletArgs = options => {
|
|
5555
|
-
if (options.
|
|
5564
|
+
if (options.editorInput.type !== 'editor') {
|
|
5556
5565
|
return options.args;
|
|
5557
5566
|
}
|
|
5567
|
+
const [viewletContext, ...rest] = options.args || [];
|
|
5568
|
+
const context = viewletContext && typeof viewletContext === 'object' ? viewletContext : {};
|
|
5558
5569
|
return [{
|
|
5559
|
-
...
|
|
5560
|
-
|
|
5561
|
-
|
|
5570
|
+
...context,
|
|
5571
|
+
focus: options.focus,
|
|
5572
|
+
...(options.forceOpen === true && {
|
|
5573
|
+
largeFile: true
|
|
5574
|
+
})
|
|
5575
|
+
}, ...rest];
|
|
5562
5576
|
};
|
|
5563
5577
|
const openInputWithContext = async (context, options) => {
|
|
5564
5578
|
const state = context.getState();
|