pub enum InlineStrategy {
ScrollRegion,
OverlayRedraw,
Hybrid,
}Expand description
Inline mode rendering strategy.
Variants§
ScrollRegion
Use scroll regions (DECSTBM) to anchor UI while logs scroll. More efficient but less portable (muxes may misbehave).
OverlayRedraw
Overlay redraw: save cursor, write logs, redraw UI, restore cursor. More portable but more redraw work.
Hybrid
Hybrid: the same DECSTBM scroll region as ScrollRegion but without
synchronized-output brackets, verified at startup by the DECSTBM
self-test (caps_probe::probe_scroll_region); a terminal that
ignores the region is switched to OverlayRedraw before the first
frame.
Implementations§
Source§impl InlineStrategy
impl InlineStrategy
Sourcepub fn select(caps: &TerminalCapabilities) -> Self
pub fn select(caps: &TerminalCapabilities) -> Self
Select the strategy from capabilities, in this order:
- inside a terminal multiplexer (tmux/screen/zellij/WezTerm mux):
OverlayRedraw(muxes may not handle scroll regions correctly); - scroll region and synchronized output:
ScrollRegion; - scroll region without synchronized output:
Hybrid; - otherwise
OverlayRedraw.
The runtime then runs the DECSTBM self-test for ScrollRegion and
Hybrid and falls back to OverlayRedraw when the terminal does not
honour the region (TerminalWriter::set_scroll_region_verified).
Trait Implementations§
Source§impl Clone for InlineStrategy
impl Clone for InlineStrategy
Source§fn clone(&self) -> InlineStrategy
fn clone(&self) -> InlineStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more