Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions src/cli/list_themes.zig
Original file line number Diff line number Diff line change
Expand Up @@ -841,15 +841,19 @@ const Preview = struct {
self.current = self.filtered.items.len - 1;
try self.applyCmuxSelectionForCurrentTheme();
}
if (key.matchesAny(&.{ 'j', '+', vaxis.Key.down, vaxis.Key.kp_down, vaxis.Key.kp_add }, .{})) {
if (key.matches('n', .{ .ctrl = true }) or
key.matchesAny(&.{ 'j', '+', vaxis.Key.down, vaxis.Key.kp_down, vaxis.Key.kp_add }, .{}))
{
self.down(1);
try self.applyCmuxSelectionForCurrentTheme();
}
if (key.matchesAny(&.{ vaxis.Key.page_down, vaxis.Key.kp_down }, .{})) {
if (key.matchesAny(&.{ vaxis.Key.page_down, vaxis.Key.kp_page_down }, .{})) {
self.down(20);
try self.applyCmuxSelectionForCurrentTheme();
}
if (key.matchesAny(&.{ 'k', '-', vaxis.Key.up, vaxis.Key.kp_up, vaxis.Key.kp_subtract }, .{})) {
if (key.matches('p', .{ .ctrl = true }) or
key.matchesAny(&.{ 'k', '-', vaxis.Key.up, vaxis.Key.kp_up, vaxis.Key.kp_subtract }, .{}))
{
self.up(1);
try self.applyCmuxSelectionForCurrentTheme();
}
Expand Down Expand Up @@ -922,6 +926,16 @@ const Preview = struct {
try self.applyCmuxSelectionForCurrentTheme();
break :search;
}
if (key.matches('n', .{ .ctrl = true })) {
self.down(1);
try self.applyCmuxSelectionForCurrentTheme();
break :search;
}
if (key.matches('p', .{ .ctrl = true })) {
self.up(1);
try self.applyCmuxSelectionForCurrentTheme();
break :search;
}
try self.text_input.update(.{ .key_press = key });
try self.updateFiltered();
try self.applyCmuxSelectionForCurrentTheme();
Expand Down Expand Up @@ -1208,10 +1222,10 @@ const Preview = struct {
.{ .keys = "^C, q, ESC", .help = "Quit." },
.{ .keys = "F1, ?, ^H", .help = "Toggle help window." },
.{ .keys = "f", .help = "Cycle through theme filters." },
.{ .keys = "k, ↑", .help = "Move up 1 theme." },
.{ .keys = "^P, k, ↑", .help = "Move up 1 theme." },
.{ .keys = "ScrollUp", .help = "Move up 1 theme." },
.{ .keys = "PgUp", .help = "Move up 20 themes." },
.{ .keys = "j, ↓", .help = "Move down 1 theme." },
.{ .keys = "^N, j, ↓", .help = "Move down 1 theme." },
.{ .keys = "ScrollDown", .help = "Move down 1 theme." },
.{ .keys = "PgDown", .help = "Move down 20 themes." },
.{ .keys = "h, x", .help = "Show palette numbers in hexadecimal." },
Expand Down