summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/exec.zig b/src/exec.zig
index b258549e..81826271 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -302,11 +302,11 @@ pub fn withArg(p: *Pardes, txt: []const u8, arg: ?[]const u8) []const u8 {
const a = std.mem.trim(u8, arg orelse return txt, " \t\r\n");
if (a.len == 0) return txt;
const t = std.mem.trim(u8, txt, " \t\r\n");
- // A switch (Verbose, PanelSlide) clicked with some other text
+ // A switch (Verbose, Wrap) clicked with some other text
// selected flips, as it does bare: only `on` or `off` is an argument
// for it. What a ctl write gives it is checked strictly instead.
if (config.Runtime.find(commandText(t))) |setting| switch (setting.action) {
- .toggle, .transition => if (!std.mem.eql(u8, a, "on") and !std.mem.eql(u8, a, "off")) return txt,
+ .toggle => if (!std.mem.eql(u8, a, "on") and !std.mem.eql(u8, a, "off")) return txt,
else => {},
};
return std.fmt.allocPrint(p.scratch.allocator(), "{s} {s}", .{ t, a }) catch txt;
@@ -1014,7 +1014,6 @@ pub fn runBuiltinFrom(p: *Pardes, b: Builtin, id: usize, txt: []const u8, arg: ?
pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]const u8) void {
const previous_colors = p.settings.colors;
const previous_context_style = p.settings.tree_context_tag_style;
- const previous_transition = p.settings.panel_transition;
const previous_tagline_percent = p.settings.font.tagline_percent;
switch (setting.action) {
.theme => {
@@ -1085,19 +1084,10 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]
const pane = slot orelse continue;
pane.geometry_key = 0;
}
- p.abandonPanelAnimations();
- }
- const transition_changed = setting.action == .transition and
- p.settings.panel_transition != previous_transition;
- const tagline_metrics_changed = setting.action == .tagline_size and
- p.settings.font.tagline_percent != previous_tagline_percent;
- // Idle frames keep no frozen grid while transitions are off; the one
- // just drawn is the baseline the first transition starts from.
- if (transition_changed and previous_transition == .off)
- p.presentation.capturePrevious(p.gpa, &p.surface);
- if (transition_changed or tagline_metrics_changed) {
- p.abandonPanelAnimations();
+ look.cancelLookHover(p);
}
+ if (setting.action == .tagline_size and p.settings.font.tagline_percent != previous_tagline_percent)
+ look.cancelLookHover(p);
}
/// What a new pane is, and who asked: each rule places them differently.