summaryrefslogtreecommitdiffstats
path: root/src/layout.rs
diff options
context:
space:
mode:
authorKyohei Uto <im@kyoheiu.dev>2023-06-09 07:16:11 +0900
committerKyohei Uto <im@kyoheiu.dev>2023-06-09 07:16:11 +0900
commit883d71e49870417125159efa62cf1841978354e8 (patch)
tree9c184b03be4bc03471301a521fba445f15fee913 /src/layout.rs
parent2a39bbd328212dd4c2833c59aa37aaecb1d6cc4f (diff)
Print :reg properly
Diffstat (limited to 'src/layout.rs')
-rw-r--r--src/layout.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout.rs b/src/layout.rs
index 50a275d..82d573e 100644
--- a/src/layout.rs
+++ b/src/layout.rs
@@ -86,7 +86,7 @@ impl Layout {
self.side = Side::None;
}
- pub fn print_reg(&self, reg: &[String], y: u16) {
+ pub fn print_reg(&self, reg: &[String]) {
match self.split {
Split::Vertical => {
self.clear_preview(self.preview_start.0);
@@ -107,7 +107,7 @@ impl Layout {
let row = self.preview_start.1 + i as u16;
move_to(self.preview_start.0, row);
print!("{}", line);
- if row == self.preview_space.1 {
+ if i as u16 == self.preview_space.1 - 1 {
break;
}
}