| 710 |
710 |
|
/// the buffer never went anywhere, so nothing is lost and there is nothing to
|
| 711 |
711 |
|
/// re-offer. This is the layer where the loss happens, so this is the layer that
|
| 712 |
712 |
|
/// repairs it.
|
|
713 |
+ |
///
|
|
714 |
+ |
/// # A field's described state is its value, and the caret is the renderer's
|
|
715 |
+ |
///
|
|
716 |
+ |
/// `d52884b0`, decided 2026-08-12. Nothing here carries a caret position, and
|
|
717 |
+ |
/// nothing in [`layout::FieldKind`] does either. A description names the field
|
|
718 |
+ |
/// and, where it has one, its completion source. Where the caret sits is how a
|
|
719 |
+ |
/// renderer decides what to offer from that source.
|
|
720 |
+ |
///
|
|
721 |
+ |
/// The question came from goingson's `search.js`, whose completion list depends
|
|
722 |
+ |
/// on which token the caret is inside rather than on the value: it reads
|
|
723 |
+ |
/// `selectionStart`, listens for caret moves that change nothing else, and
|
|
724 |
+ |
/// writes the caret back when a suggestion is applied. That is a real
|
|
725 |
+ |
/// dependency, and it still does not belong here. A caret is where the user is
|
|
726 |
+ |
/// pointing inside a control, the same class of fact as a scroll offset and a
|
|
727 |
+ |
/// focus position, and this stack already puts those in the renderer's view
|
|
728 |
+ |
/// rather than in the description (`quasi-tui`'s `View`).
|
|
729 |
+ |
///
|
|
730 |
+ |
/// Growing this struct to (value, caret) was rejected: it is the most-consumed
|
|
731 |
+ |
/// member in the vocabulary, every renderer would owe it an answer, and a
|
|
732 |
+ |
/// terminal's answer would be a second cursor concept beside the one the runtime
|
|
733 |
+ |
/// already holds. The measured demand was one file.
|
|
734 |
+ |
///
|
|
735 |
+ |
/// Reversible if a second consumer appears that needs the caret described rather
|
|
736 |
+ |
/// than held, such as a completion that has to survive a fragment swap. That is
|
|
737 |
+ |
/// a member here and a cascade, the same shape as every other addition.
|
|
738 |
+ |
///
|
| 713 |
739 |
|
/// No `Hash`, for the reason [`Tag`] has none: it can hold an [`Action`], which
|
| 714 |
740 |
|
/// holds [`Params`], which is a `Vec`.
|
| 715 |
741 |
|
#[derive(Debug, Clone, PartialEq, Eq)]
|