Skip to content

Commit

Permalink
docs: edit GoDocs for ReleaseTerminal and RestoreTerminal
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Mar 1, 2022
1 parent d6a35c2 commit 0a31836
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tea.go
Expand Up @@ -668,14 +668,15 @@ func (p *Program) DisableMouseAllMotion() {
}

// ReleaseTerminal restores the original terminal state and cancels the input
// reader.
// reader. You can return control to the Program with RestoreTerminal.
func (p *Program) ReleaseTerminal() error {
p.cancelInput()
return p.restoreTerminal()
}

// RestoreTerminal sets up the input reader & terminal state and triggers a
// repaint.
// RestoreTerminal reinitializes the Program's input reader, restores the
// terminal to the former state when the program was running, and repaints.
// Use it to reinitialize a Program after running ReleaseTerminal.
func (p *Program) RestoreTerminal() error {
if err := p.initTerminal(); err != nil {
return err
Expand Down

0 comments on commit 0a31836

Please sign in to comment.