pub struct ProgramOptions {
pub bracketed_paste: bool,
pub mouse: Option<MouseTracking>,
pub color_profile: Option<Profile>,
pub legacy_keys: DecoderFlags,
pub prefer_grapheme_clusters: bool,
pub prefer_in_band_resize: bool,
pub prefer_synchronized_output: bool,
}Expand description
Options for session setup.
Constructors store these options. Program::init applies startup
settings, and Program::apply_defaults uses the adoption preferences.
Probe selects queries.
Fields§
§bracketed_paste: boolEnable bracketed paste at init. Defaults to true.
mouse: Option<MouseTracking>Enable mouse tracking at init with the given MouseTracking extras
(see Program::enable_mouse). The request is emitted unconditionally;
terminals ignore modes they do not support and degrade gracefully.
Defaults to None (mouse tracking off).
color_profile: Option<Profile>Select the initial renderer color profile.
None detects the profile from the environment and output terminal.
Some(profile) uses the supplied profile, including for redirected output.
apply_defaults can later upgrade it
to truecolor when the terminal reports direct-color support.
legacy_keys: DecoderFlagsHow to read the ambiguous legacy keys.
Defaults to empty. LF reads as Ctrl+J;
DecoderFlags::LF_IS_ENTER selects Enter instead. See DecoderFlags
for all mappings. Use Program::set_decoder_flags to change the
active flags after initialization.
prefer_grapheme_clusters: boolAdopt grapheme-cluster mode when the capability record confirms support.
Defaults to true. Takes effect through Program::apply_defaults,
after a support reply. An explicit mode choice takes precedence.
prefer_in_band_resize: boolAdopt in-band resize when the capability record confirms support.
Defaults to true. Takes effect through Program::apply_defaults,
after a support reply. An explicit mode choice takes precedence.
prefer_synchronized_output: boolAdopt synchronized output when the capability record confirms support.
Defaults to true. Takes effect through Program::apply_defaults.
The first supporting record settles this preference, including an
opt-out. Use this preference for a session-wide choice.
Implementations§
Source§impl ProgramOptions
impl ProgramOptions
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create options with optional modes and decoder flags disabled.
The color profile is detected from the environment and output.
Program::init still enters raw mode and sets up the session.
Default also enables bracketed paste.