mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 09:01:20 +00:00
Fix TUI rendering with wrong dimensions after suspend/resume
- Send SIGWINCH to self on terminal start to refresh stale dimensions (Unix only) - Change requestRender(true) to set previousWidth = -1 to trigger widthChanged - Update first render condition to skip when widthChanged is true Fixes #599
This commit is contained in:
parent
019ad0ec11
commit
d7394eb109
3 changed files with 13 additions and 3 deletions
|
|
@ -70,6 +70,12 @@ export class ProcessTerminal implements Terminal {
|
|||
// Set up resize handler immediately
|
||||
process.stdout.on("resize", this.resizeHandler);
|
||||
|
||||
// Refresh terminal dimensions - they may be stale after suspend/resume
|
||||
// (SIGWINCH is lost while process is stopped). Unix only.
|
||||
if (process.platform !== "win32") {
|
||||
process.kill(process.pid, "SIGWINCH");
|
||||
}
|
||||
|
||||
// Query and enable Kitty keyboard protocol
|
||||
// The query handler intercepts input temporarily, then installs the user's handler
|
||||
// See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue