summaryrefslogtreecommitdiff
path: root/core/Core.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Core.zig')
-rw-r--r--core/Core.zig15
1 files changed, 7 insertions, 8 deletions
diff --git a/core/Core.zig b/core/Core.zig
index 3a2e1f51..aaadbbf6 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -2046,8 +2046,8 @@ pub fn layOut(p: *Pardes) void {
const wa = wrap_fba.allocator();
const prefix: ?[]const u8 = tagline.prefixIn(p, wa, pane) catch null;
// The tag's cursor and selections are offsets in its text at rest:
- // a head shown over its own text moves none of them (UX D1).
- const at_rest = if (pardes.Trail.outOfRest(p, pane) or pardes.TagState.asks(p, pane)) tagline.restPrefix(p, wa, pane) catch null else prefix;
+ // a question shown over its own text moves none of them (UX D13).
+ const at_rest = if (pardes.TagState.asks(p, pane)) tagline.restPrefix(p, wa, pane) catch null else prefix;
const lead = if (at_rest) |made| made.len else pane.tag_lead;
if (lead != pane.tag_lead) {
const t = &pane.tag;
@@ -2077,12 +2077,11 @@ pub fn layOut(p: *Pardes) void {
caret_row = std.mem.count(u8, shown.text[0..@min(shown.fromReal(cur), shown.text.len)], "\n");
}
if (!pane.tag_expanded) wanted = 1;
- // Out of rest the tag keeps exactly the rows its own text takes at
- // rest: its head's rows past them and the band under it are drawn
- // over the top rows of its body, which never move for them (UX
- // DESIGN I1, Band.covered); its head is drawn whole from its first
- // row. A picker's preview starts under them, as a file's first
- // lines could not be put under a band otherwise (Pick.previewing).
+ // Out of rest the tag keeps exactly its rows at rest: its head and
+ // band hang under it, drawn over the top rows of its body, which
+ // never move for them (UX DESIGN I1, M2, Band.covered). A picker's
+ // preview starts under them, as a file's first lines could not be
+ // put under a band otherwise (Pick.previewing).
const host = pardes.TagState.hostOf(p) == id and !pane.collapsed;
if (host) wanted = layout.wantedTagRows(p, id);
pane.tag_rows = @intCast(@min(wanted, MAX_TAG_ROWS, @max(BOX_H, r.h -| 1)));