Skip to content

Modern Tui TuiTerminal Leave

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Terminal TUI Library › Terminal › TuiTerminal.Leave

TuiTerminal.Leave

Puts the terminal back the way Enter found it; safe to call more than once.

Syntax

TuiTerminal.Leave( ) as TuiUnitResult

Description

Undoes everything Enter did, in exactly the reverse order, and restores the saved console mode word or termios. The style is reset FIRST so nothing bleeds onto the main screen, and the alternate screen is left LAST. Safe to call when not active.

Example

#import "std/tui"
using tui

dim as TuiTerminal term
print term.Leave( ).IsOk( )       '' true -- nothing to undo, still fine
print term.IsActive( )            '' false

See also

TuiTerminal TuiTerminal.Size TuiTerminal.Write TuiTerminal.Discard
TuiTerminal.Enter TuiTerminal.Caps TuiTerminal.WriteText TuiTerminal.Pending
TuiTerminal.IsActive TuiTerminal.DetectCaps TuiTerminal.Flush TuiTerminal.TakeResize

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Terminal
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally