Skip to content
Myr

xterm.go

This file

Path

xterm.go

23 lines · 684 bytes · Go

Last changed by

fix: skip capability queries when input is disabled (#1801)draw me an elephantbefore adoption8b10e22

History of this file

Take it

1package tea23// TerminalVersionMsg is a message that represents the terminal version.4type TerminalVersionMsg struct {5	Name string6}78// String returns the terminal name as a string.9func (t TerminalVersionMsg) String() string {10	return t.Name11}1213// terminalVersion is an internal message that queries the terminal for its14// version using XTVERSION.15type terminalVersion struct{}1617// RequestTerminalVersion is a command that queries the terminal for its18// version using XTVERSION. Note that some terminals may not support this19// command. Use [WithInput] to enable input, since the reply cannot be read20// otherwise.21func RequestTerminalVersion() Msg {22	return terminalVersion{}23}