mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-17 20:51:55 +01:00
sync shell state when you switch to a new tab
This commit is contained in:
parent
4b5eccab7c
commit
9c32f690c6
@ -304,6 +304,10 @@ class CommandRunner {
|
|||||||
GlobalModel.clientSettingsViewModel.showClientSettingsView();
|
GlobalModel.clientSettingsViewModel.showClientSettingsView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
syncShellState() {
|
||||||
|
GlobalModel.submitCommand("sync", null, null, { nohist: "1" }, false);
|
||||||
|
}
|
||||||
|
|
||||||
historyView(params: HistorySearchParams) {
|
historyView(params: HistorySearchParams) {
|
||||||
let kwargs = { nohist: "1" };
|
let kwargs = { nohist: "1" };
|
||||||
kwargs["offset"] = String(params.offset);
|
kwargs["offset"] = String(params.offset);
|
||||||
|
@ -1086,6 +1086,9 @@ class Model {
|
|||||||
this.activeMainView.set("session");
|
this.activeMainView.set("session");
|
||||||
this.deactivateScreenLines();
|
this.deactivateScreenLines();
|
||||||
this.ws.watchScreen(newActiveSessionId, newActiveScreenId);
|
this.ws.watchScreen(newActiveSessionId, newActiveScreenId);
|
||||||
|
setTimeout(() => {
|
||||||
|
GlobalCommandRunner.syncShellState();
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.warn("unknown update", genUpdate);
|
console.warn("unknown update", genUpdate);
|
||||||
|
@ -493,7 +493,7 @@ func getEvalDepth(ctx context.Context) int {
|
|||||||
func SyncCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (scbus.UpdatePacket, error) {
|
func SyncCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (scbus.UpdatePacket, error) {
|
||||||
ids, err := resolveUiIds(ctx, pk, R_Session|R_Screen|R_RemoteConnected)
|
ids, err := resolveUiIds(ctx, pk, R_Session|R_Screen|R_RemoteConnected)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("/run error: %w", err)
|
return nil, fmt.Errorf("/sync error: %w", err)
|
||||||
}
|
}
|
||||||
runPacket := packet.MakeRunPacket()
|
runPacket := packet.MakeRunPacket()
|
||||||
runPacket.ReqId = uuid.New().String()
|
runPacket.ReqId = uuid.New().String()
|
||||||
|
Loading…
Reference in New Issue
Block a user