summaryrefslogtreecommitdiff
path: root/core/body_layer.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/body_layer.zig')
-rw-r--r--core/body_layer.zig7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/body_layer.zig b/core/body_layer.zig
index 9c4a4c73..4176514b 100644
--- a/core/body_layer.zig
+++ b/core/body_layer.zig
@@ -379,7 +379,10 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
if (b == pardes.sel_slot and @min(sl.r0, sl.r1) < pane.tag_rows) continue;
paintPointerSelection(p, s, pane, r, sl, pane.tag_rows, sel_btn[b], buttonInks(th)[b]);
}
- const preview = normal.selRegexArmed(pane) != null;
+ // A selecting prompt's live result (Prompt.zig), dimmed while its
+ // field is no regex.
+ const selecting = pardes.Prompt.selecting(p, pane);
+ const preview = normal.selRegexArmed(pane) != null or selecting != null;
const show_prim = (pane.body.mode == .normal and pane.body.vsel.active) or preview or
(modal_hover and pane.body.vsel.active);
const show_extra = pane.body.mode != .tty and pane.body.nsel > 0;
@@ -397,7 +400,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
} else pane.body.sels[si];
const bnd = edit.cellBounds(sr);
const hover_only = primary and modal_hover and pane.body.mode != .normal and !preview;
- const bg = if (hover_only)
+ const bg = if (hover_only or (selecting != null and selecting.?.dim))
colors.mix(page_rgb, colors.mix(page_rgb, th.sel_bg))
else if (primary)
th.sel_bg