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: no scroll region. The runtime’s TerminalWriter
batches log lines, erases the UI rows, streams the lines with
ordinary line feeds so the whole screen scrolls them into
scrollback, then redraws the UI (bottom-anchored UI; a top-anchored
UI keeps only the newest line). Works on any terminal; costs one UI
redraw per batch.
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).