struct

TermBuf::WidthProbe::Result

Inherits Struct < Value < Object

Everything the probe learned.

Constructors

new(policy : Unicode::WidthPolicy, readings : Array(Reading), input : Bytes, answered : Bool)
Source

Instance methods

answered

Whether the terminal answered at all. When it did not, policy is whatever was passed in.

clone
Source
copy_with(policy _policy = @policy, readings _readings = @readings, input _input = @input, answered _answered = @answered)
Source
disagreements

Samples the resulting policy still measures differently from the terminal. Terminals reach conclusions this design has no flag for, and naming what is left over beats modelling it wrong.

Source
input

Keystrokes that arrived while the probe was running.

per_code_point_columns?

Whether the terminal counts a cluster's columns by adding its code points up, or nil when it did not answer the sample that tells the two apart.

The samples are already the right question. One of them has a per-code-point count that no policy can reach — four faces joined by zero width joiners own eleven that way, against two collapsed and eight laid out — so its answer names the terminal's bookkeeping outright. Measuring beats matching on the terminal's name, which can neither know about a version that fixed it nor about a terminal nobody has tried.

Source
policy
readings