From 3c493f2d0d1565a71e2fc7d935617a7d85ce08e2 Mon Sep 17 00:00:00 2001 From: Pepper Lebeck-Jobe Date: Sat, 9 Nov 2024 10:10:29 +0100 Subject: [PATCH] Fix copying the theme name Prior to this change both C and c would copy the path to the theme even though the help screen claimed that c would copy the theme name. There is a bug in libvaxis that results in both of these matches matching c: `key.matches('c', .{})` `key.matches('c', .{ .shift = true })` Tested: Before the change: 'c' copies path and 'C' copies path After the change: 'c' copies the name and 'C' copies the path --- src/cli/list_themes.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/list_themes.zig b/src/cli/list_themes.zig index 92cb57be2..0903fab94 100644 --- a/src/cli/list_themes.zig +++ b/src/cli/list_themes.zig @@ -382,8 +382,8 @@ const Preview = struct { self.tty.anyWriter(), self.themes[self.filtered.items[self.current]].theme, alloc, - ); - if (key.matches('c', .{ .shift = true })) + ) + else if (key.matches('c', .{ .shift = true })) try self.vx.copyToSystemClipboard( self.tty.anyWriter(), self.themes[self.filtered.items[self.current]].path,