mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-04-16 20:26:12 +02:00
reinit focus
This commit is contained in:
parent
aa56db0bc4
commit
be978a25b2
@ -444,7 +444,11 @@ func main() {
|
||||
|
||||
err = sstore.HangupAllRunningCmds(context.Background())
|
||||
if err != nil {
|
||||
log.Printf("[error] calling HUP on all running commands\n")
|
||||
log.Printf("[error] calling HUP on all running commands: %v\n", err)
|
||||
}
|
||||
err = sstore.ReInitFocus(context.Background())
|
||||
if err != nil {
|
||||
log.Printf("[error] resetting window focus: %v\n", err)
|
||||
}
|
||||
|
||||
go stdinReadWatch()
|
||||
|
@ -784,6 +784,14 @@ func AppendCmdErrorPk(ctx context.Context, errPk *packet.CmdErrorPacketType) err
|
||||
})
|
||||
}
|
||||
|
||||
func ReInitFocus(ctx context.Context) error {
|
||||
return WithTx(ctx, func(tx *TxWrap) error {
|
||||
query := `UPDATE screen_window SET focustype = 'input'`
|
||||
tx.ExecWrap(query)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func HangupAllRunningCmds(ctx context.Context) error {
|
||||
return WithTx(ctx, func(tx *TxWrap) error {
|
||||
query := `UPDATE cmd SET status = ? WHERE status = ?`
|
||||
|
Loading…
Reference in New Issue
Block a user