LibTmux.Mcp.BoundedText
-
Terminal text cut to fit a budget, with what was cut reported.
Description#
Dropping is always from the oldest end. A terminal's newest line is the one that says what happened, so a budget that discarded it would answer the wrong question. Reporting the loss is what separates a short answer from a wrong one: a reader who cannot see that lines are missing will conclude the pane never printed them.
Members
- Empty : Bounded
Text -
An empty result that dropped nothing.
- Fit ( lines : IRead
Only <string> , maxLines : int? , maxBytes : int ) BoundedList Text -
Cuts lines down to a line and byte budget, keeping the newest.
- Parameters
-
-
lines ( IRead
Only <string> ) – The captured text, oldest first.List -
maxLines ( int? ) – The most lines to keep, or null for no line limit.
-
maxBytes ( int ) – The most UTF-8 bytes to keep.
-
- Returns
-
The text that fits, and what it cost to make it fit.
-
Renders the text as one block, noting any loss at the top.
Description#
The notice leads because a reader who sees it will read what follows as a tail rather than as the whole pane.
- Returns
-
The lines joined by newlines, after any truncation notice.