pub struct LogicalLine {
pub text: String,
pub cells: Vec<(i32, usize)>,
}Expand description
One soft-wrap-joined logical line touching the viewport.
Fields§
§text: StringThe line text: wrap-joined across soft-wrapped rows, wide-char spacers
skipped, trailing blanks trimmed. This is not the equivalence to xterm.js’s
BufferLine.translateToString(true) an earlier version of this comment claimed. The
spacer skip matches; the wrap join does not (that method spans one BufferLine —
xterm pairs it with Buffer.getWrappedRangeForLine); and the trim differs on a line
ending in printed spaces, which xterm keeps and trim_end drops. Pinned in
docs/agents/reference-facts.md § “Logical-line assembly”.
cells: Vec<(i32, usize)>Per text char, the viewport cell (row, col) it came from. A row
outside 0..rows is off-screen wrapped context (a line that wraps in from
above the top / out past the bottom) — present so a URL spanning the edge
still matches; the consumer highlights only the in-range cells.
Trait Implementations§
Source§impl Clone for LogicalLine
impl Clone for LogicalLine
Source§fn clone(&self) -> LogicalLine
fn clone(&self) -> LogicalLine
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more