forked from Mirrors/bubbletea
Always hide and show the cursor during startup and shutdown
This commit is contained in:
parent
e1ca585c16
commit
01dd88fd1d
5
tty.go
5
tty.go
|
@ -19,17 +19,12 @@ func (p *Program) initTerminal() error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.outputIsTTY {
|
|
||||||
hideCursor(p.output)
|
hideCursor(p.output)
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p Program) restoreTerminal() error {
|
func (p Program) restoreTerminal() error {
|
||||||
if p.outputIsTTY {
|
|
||||||
showCursor(p.output)
|
showCursor(p.output)
|
||||||
}
|
|
||||||
|
|
||||||
if p.console != nil {
|
if p.console != nil {
|
||||||
err := p.console.Reset()
|
err := p.console.Reset()
|
||||||
|
|
Loading…
Reference in New Issue