Fix styled switch-back repaint
This commit is contained in:
@@ -379,9 +379,10 @@ func (c *Child) signal(sig syscall.Signal) error {
|
||||
// ratatui/ink TUIs re-render coherently against the snapshot we just
|
||||
// replayed. We toggle the PTY size by one row so the kernel reliably
|
||||
// emits SIGWINCH (TIOCSWINSZ skips the signal if the size didn't
|
||||
// change). The emulator is left alone — it already matches our intended
|
||||
// size and the brief mismatch only affects what the child writes during
|
||||
// the second redraw.
|
||||
// change), then send SIGWINCH explicitly for TUIs that miss or coalesce
|
||||
// the size-toggled signal. The emulator is left alone — it already
|
||||
// matches our intended size and the brief mismatch only affects what the
|
||||
// child writes during the second redraw.
|
||||
func (c *Child) NudgeRedraw(cols, rows uint16) {
|
||||
pty := c.PTY()
|
||||
if pty == nil || rows < 2 {
|
||||
@@ -389,6 +390,7 @@ func (c *Child) NudgeRedraw(cols, rows uint16) {
|
||||
}
|
||||
_ = pty.Resize(cols, rows-1)
|
||||
_ = pty.Resize(cols, rows)
|
||||
_ = c.signal(syscall.SIGWINCH)
|
||||
}
|
||||
|
||||
func (c *Child) markExited(err error) {
|
||||
|
||||
Reference in New Issue
Block a user