diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-01-05 07:51:24 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-01-05 07:51:24 -0500 |
commit | 2e773c6836463339c73b532d66edf334d412daf5 (patch) | |
tree | 6bd675556b8dbfd645484071dfa34e81d26e02fb /src/shell/history/mod.rs | |
parent | f9c5cb86304748baf0da99126bf75c5a3cd3e773 (diff) | |
download | nbsh-2e773c6836463339c73b532d66edf334d412daf5.tar.gz nbsh-2e773c6836463339c73b532d66edf334d412daf5.zip |
allow the most recent command output to be bigger
Diffstat (limited to 'src/shell/history/mod.rs')
-rw-r--r-- | src/shell/history/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shell/history/mod.rs b/src/shell/history/mod.rs index d8adb49..7cd37fc 100644 --- a/src/shell/history/mod.rs +++ b/src/shell/history/mod.rs @@ -35,7 +35,8 @@ impl History { self.visible(repl_lines, focus, scrolling).await.rev() { let focused = focus.map_or(false, |focus| idx == focus); - used_lines += entry.lines(self.size.1, focused && !scrolling); + used_lines += + entry.lines(self.entry_count(), focused && !scrolling); out.move_to( (usize::from(self.size.0) - used_lines).try_into().unwrap(), 0, @@ -44,7 +45,7 @@ impl History { out, idx, self.entry_count(), - self.size.1, + self.size, focused, scrolling, offset, @@ -218,7 +219,8 @@ impl History { { let entry = entry.lock_arc().await; let focused = focus.map_or(false, |focus| idx == focus); - used_lines += entry.lines(self.size.1, focused && !scrolling); + used_lines += + entry.lines(self.entry_count(), focused && !scrolling); if used_lines > usize::from(self.size.0) { break; } |