Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

LibTmux.Mcp.BoundedText

.NET
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

struct LibTmux.Mcp.BoundedText
struct [source]
struct [source]
struct LibTmux.Mcp.BoundedText

Terminal text cut to fit a budget, with what was cut reported.

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

Empty : BoundedText
propertystatic [source]
propertystatic [source]
Empty

An empty result that dropped nothing.

Fit

Fit ( lines : IReadOnlyList<string> , maxLines : int? , maxBytes : int ) → BoundedText
methodstatic [source]
methodstatic [source]
Fit

Cuts lines down to a line and byte budget, keeping the newest.

Parameters
  • lines ( IReadOnlyList<string> ) – The captured text, oldest first.

  • 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.

ToDisplayString

ToDisplayString ( ) → string
method [source]
method [source]
ToDisplayString

Renders the text as one block, noting any loss at the top.

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.

Esc

Type to search.