MCPcopy Create free account
hub / github.com/charmbracelet/bubbletea / restoreTerminalState

Method restoreTerminalState

tty.go:36–41  ·  view source on GitHub ↗

restoreTerminalState restores the terminal to the state prior to running the Bubble Tea program.

()

Source from the content-addressed store, hash-verified

34// restoreTerminalState restores the terminal to the state prior to running the
35// Bubble Tea program.
36func (p *Program) restoreTerminalState() error {
37 // Flush queued commands.
38 p.keepWriteErr(p.flush())
39
40 return p.restoreInput()
41}
42
43// restoreInput restores the tty input to its original state.
44func (p *Program) restoreInput() error {

Callers 3

RunMethod · 0.95
shutdownMethod · 0.95
releaseTerminalMethod · 0.95

Calls 3

keepWriteErrMethod · 0.95
flushMethod · 0.95
restoreInputMethod · 0.95

Tested by

no test coverage detected