summaryrefslogtreecommitdiffstats
path: root/src/interactive/widgets/mark.rs
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2021-07-14 08:35:06 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2021-07-14 08:35:06 +0800
commitb12b98a07935c839a11af08cfa9dc872b5a127e8 (patch)
tree898b0962b75eb87af194c288e24de20df2ea0c70 /src/interactive/widgets/mark.rs
parent64175e028965958d0c22f8ffe55cab2fc01f9fc8 (diff)
parent6894dd8db51cd6fe8a70ad0c906ef351dc0a720c (diff)
Merge branch 'optional-trash'
Diffstat (limited to 'src/interactive/widgets/mark.rs')
-rw-r--r--src/interactive/widgets/mark.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interactive/widgets/mark.rs b/src/interactive/widgets/mark.rs
index d80b311..0cc48f2 100644
--- a/src/interactive/widgets/mark.rs
+++ b/src/interactive/widgets/mark.rs
@@ -28,6 +28,7 @@ use unicode_segmentation::UnicodeSegmentation;
pub enum MarkMode {
Delete,
+ #[cfg(feature = "trash-move")]
Trash,
}
@@ -110,6 +111,7 @@ impl MarkPane {
let action = None;
match key {
Ctrl('r') => return Some(self.prepare_deletion(MarkMode::Delete)),
+ #[cfg(feature = "trash-move")]
Ctrl('t') => return Some(self.prepare_deletion(MarkMode::Trash)),
Char('x') | Char('d') | Char(' ') => {
return self.remove_selected().map(|s| (s, action))
@@ -360,6 +362,7 @@ impl MarkPane {
sub_modifier: Modifier::empty(),
};
Paragraph::new(Text::from(Spans::from(vec![
+ #[cfg(feature = "trash-move")]
Span::styled(
" Ctrl + t",
Style {
@@ -368,6 +371,7 @@ impl MarkPane {
..default_style
},
),
+ #[cfg(feature = "trash-move")]
Span::styled(" to trash or ", default_style),
Span::styled(
" Ctrl + r",