mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
add a refocus at the end of wave reinit (#1499)
This commit is contained in:
parent
4918737044
commit
f4de338bc3
@ -142,6 +142,10 @@ function switchTab(offset: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleCmdI() {
|
function handleCmdI() {
|
||||||
|
globalRefocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function globalRefocus() {
|
||||||
const layoutModel = getLayoutModelForStaticTab();
|
const layoutModel = getLayoutModelForStaticTab();
|
||||||
const focusedNode = globalStore.get(layoutModel.focusedNode);
|
const focusedNode = globalStore.get(layoutModel.focusedNode);
|
||||||
if (focusedNode == null) {
|
if (focusedNode == null) {
|
||||||
@ -345,6 +349,7 @@ export {
|
|||||||
appHandleKeyDown,
|
appHandleKeyDown,
|
||||||
getAllGlobalKeyBindings,
|
getAllGlobalKeyBindings,
|
||||||
getSimpleControlShiftAtom,
|
getSimpleControlShiftAtom,
|
||||||
|
globalRefocus,
|
||||||
registerControlShiftStateUpdateHandler,
|
registerControlShiftStateUpdateHandler,
|
||||||
registerElectronReinjectKeyHandler,
|
registerElectronReinjectKeyHandler,
|
||||||
registerGlobalKeys,
|
registerGlobalKeys,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import { App } from "@/app/app";
|
import { App } from "@/app/app";
|
||||||
import {
|
import {
|
||||||
|
globalRefocus,
|
||||||
registerControlShiftStateUpdateHandler,
|
registerControlShiftStateUpdateHandler,
|
||||||
registerElectronReinjectKeyHandler,
|
registerElectronReinjectKeyHandler,
|
||||||
registerGlobalKeys,
|
registerGlobalKeys,
|
||||||
@ -106,6 +107,9 @@ async function reinitWave() {
|
|||||||
getApi().setWindowInitStatus("wave-ready");
|
getApi().setWindowInitStatus("wave-ready");
|
||||||
globalStore.set(atoms.reinitVersion, globalStore.get(atoms.reinitVersion) + 1);
|
globalStore.set(atoms.reinitVersion, globalStore.get(atoms.reinitVersion) + 1);
|
||||||
globalStore.set(atoms.updaterStatusAtom, getApi().getUpdaterStatus());
|
globalStore.set(atoms.updaterStatusAtom, getApi().getUpdaterStatus());
|
||||||
|
setTimeout(() => {
|
||||||
|
globalRefocus();
|
||||||
|
}, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadAllWorkspaceTabs(ws: Workspace) {
|
function reloadAllWorkspaceTabs(ws: Workspace) {
|
||||||
|
Loading…
Reference in New Issue
Block a user