mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 16:02:24 +00:00
Read as oracles first, on the theory that a comment stating a rule is a
test of whether the code still follows it. All four still do:
- `completion_generation` is the guard against a background generator
landing its results in a session the user has since closed or
replaced. Bumped on open and on close, and checked before the result
is used — `self.completion_generation != generation` is still there.
- `link_modifier_down` exists because mouse events can lag or omit the
modifier while a mouse-tracking TUI is foreground. Both hover sites
still read `mods.secondary() || v.link_modifier_down()`, so neither
depends on the move event's snapshot alone.
- `scroll_frac` is the sub-line part of the scroll position that makes
trackpad scrolling continuous, and is still reset at every path that
jumps the view.
- `scroll_debt` accumulates sub-line wheel deltas instead of rounding
each one away, which is what stops slow scrolling from never moving:
`total - lines` is still how it is spent.
`scroll_debt` was also the target of a doc link from `zoom_debt`
("kept apart from [`scroll_debt`]") pointing at an undocumented field,
so the pair reads as a pair again.