Skip to content
Myr

fix: we don't initialize the terminal when using a nilRenderer (#1120)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Otherwise, a raw terminal will mess up the output. This is because a raw terminal disables termios OPOST mode which converts newlines to `\r\n` to reset the cursor to the beginning of the screen on new lines.

authored by Ayman Bagabas · committed by GitHub · parent af7ec0e · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:tty.go+5 added
21 unmodified lines
22 go p.Send(ResumeMsg{})23}2425func (p *Program) initTerminal() error {26 if _, ok := p.renderer.(*nilRenderer); ok {27 // No need to initialize the terminal if we're not rendering28 return nil29 }3031 if err := p.initInput(); err != nil {32 return err33 }34
98 unmodified lines