summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-10-26 01:36:25 +0300
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-10-26 01:36:25 +0300
commita487c4e01dd07e67449b69f1bab90d13c59b54d9 (patch)
treeafb63f9d0341d8fc9aa9dbb240cb523dbcfa4d94
parenta8d5958f012125d3b1a17aab3e05652ce847aa8d (diff)
Fix cursor bug
-rw-r--r--Cargo.toml2
-rw-r--r--src/ui/components/processes.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 567cde7..259ba70 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "bb"
-version = "0.2.0"
+version = "0.2.1"
authors = ["Manos Pitsidianakis <el13635@mail.ntua.gr>"]
license-file = "COPYING"
description = "clean simple fast process viewer"
diff --git a/src/ui/components/processes.rs b/src/ui/components/processes.rs
index fcb23f1..7e93704 100644
--- a/src/ui/components/processes.rs
+++ b/src/ui/components/processes.rs
@@ -450,9 +450,9 @@ impl Component for ProcessList {
.0
.contains(self.filter_term.as_ref().unwrap())
});
- self.height = processes.len();
- self.cursor = std::cmp::min(self.height, self.cursor);
}
+ self.height = processes.len();
+ self.cursor = std::cmp::min(self.height, self.cursor);
for p in processes.iter().skip(pages * height).take(height) {
let fg_color = Color::Default;