summaryrefslogtreecommitdiffstats
path: root/src/interactive/widgets
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-08 04:32:59 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-08 05:05:09 +0530
commitfcde45752a9b86ed606b78f522f6b6dd0de25457 (patch)
treeaef686af5c2abdc92bc3425fc4606e205a6513be /src/interactive/widgets
parent01dd8e284224e42b59f317cd922d388f23def829 (diff)
Pune/India: don't show warning if nothing is marked anymore
this can happen if the user removes all entries. The pane stays open in this case, which is a little inconsistent, but not worth fixing as it's certainly not the common case. If it should be fixed, the 'key()' function should become consuming to possible delete the pane.
Diffstat (limited to 'src/interactive/widgets')
-rw-r--r--src/interactive/widgets/mark.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interactive/widgets/mark.rs b/src/interactive/widgets/mark.rs
index 18a13c1..cc6bf88 100644
--- a/src/interactive/widgets/mark.rs
+++ b/src/interactive/widgets/mark.rs
@@ -208,7 +208,7 @@ impl MarkPane {
let inner_area = block.inner(area);
block.draw(area, buf);
- let list_area = if self.has_focus {
+ let list_area = if self.has_focus && !self.marked.is_empty() {
let (help_line_area, list_area) = {
let regions = Layout::default()
.direction(Direction::Vertical)
@@ -234,7 +234,7 @@ impl MarkPane {
},
),
Text::Styled(
- " permanently deletes list without prompt".into(),
+ " deletes listed entries from disk without prompt".into(),
default_style,
),
]