From e2686952b4daf4c35303689c36bebc3dfe3faf29 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 21 Jan 2022 16:27:47 +0800 Subject: [PATCH] feat: interactive mode learns 'toggle [a]ll' and 'remove [a]ll'. In the mark pane, the 'a' key will now toggle all entries. This is particularly interesting for selecting entries to exclude by hande and then invert the selection by toggling [a]ll. In the mark pane, toggling all with the 'a' key means removing all entries and closing the pane. --- src/interactive/widgets/entries.rs | 2 +- src/interactive/widgets/mark.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interactive/widgets/entries.rs b/src/interactive/widgets/entries.rs index 5552d08e..3f39a73e 100644 --- a/src/interactive/widgets/entries.rs +++ b/src/interactive/widgets/entries.rs @@ -182,7 +182,7 @@ impl Entries { ); } let bound = line_bound(bound, bound.height.saturating_sub(1) as usize); - let help_text = " mark-move = d | mark-toggle = space "; + let help_text = " mark-move = d | mark-toggle = space | toggle-all = a"; let help_text_block_width = block_width(help_text); if help_text_block_width <= bound.width { draw_text_nowrap_fn( diff --git a/src/interactive/widgets/mark.rs b/src/interactive/widgets/mark.rs index 19f2173c..291c149a 100644 --- a/src/interactive/widgets/mark.rs +++ b/src/interactive/widgets/mark.rs @@ -412,7 +412,7 @@ impl MarkPane { ); } let bound = line_bound(bound, bound.height.saturating_sub(1) as usize); - let help_text = " mark-toggle = space|d"; + let help_text = " mark-toggle = space,d | remove-all = a"; let help_text_block_width = block_width(help_text); if help_text_block_width <= bound.width { draw_text_nowrap_fn(