MCPcopy
hub / github.com/charmbracelet/bubbletea / releaseTerminal

Method releaseTerminal

tea.go:1323–1339  ·  view source on GitHub ↗
(reset bool)

Source from the content-addressed store, hash-verified

1321}
1322
1323func (p *Program) releaseTerminal(reset bool) error {
1324 atomic.StoreUint32(&p.ignoreSignals, 1)
1325 if p.cancelReader != nil {
1326 p.cancelReader.Cancel()
1327 }
1328
1329 p.waitForReadLoop()
1330
1331 if p.renderer != nil {
1332 p.stopRenderer(false)
1333 if reset {
1334 p.renderer.reset()
1335 }
1336 }
1337
1338 return p.restoreTerminalState()
1339}
1340
1341// RestoreTerminal reinitializes the Program's input reader, restores the
1342// terminal to the former state when the program was running, and repaints.

Callers 3

suspendMethod · 0.95
execMethod · 0.95
ReleaseTerminalMethod · 0.95

Calls 4

waitForReadLoopMethod · 0.95
stopRendererMethod · 0.95
restoreTerminalStateMethod · 0.95
resetMethod · 0.65

Tested by

no test coverage detected