Skip to content

Commit

Permalink
Rename visual_lines to full_height
Browse files Browse the repository at this point in the history
  • Loading branch information
spoutn1k authored and djc committed Nov 15, 2024
1 parent 3ac5510 commit 199cdce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/draw_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,15 @@ impl DrawState {
// printing, taking wrapping into account.
let orphan_visual_line_count = self.visual_line_count(..text_line_count, term_width);
let bar_height = self.visual_line_count(text_line_count.., term_width);
let visual_lines = self.visual_line_count(.., term_width);
let full_height = self.visual_line_count(.., term_width);

// Sanity checks
debug_assert!(visual_lines == orphan_visual_line_count + bar_height);
debug_assert!(full_height == orphan_visual_line_count + bar_height);
debug_assert!(self.orphan_lines_count <= self.lines.len());

let shift = match self.alignment {
MultiProgressAlignment::Bottom if visual_lines < *last_line_count => {
let shift = *last_line_count - visual_lines;
MultiProgressAlignment::Bottom if full_height < *last_line_count => {
let shift = *last_line_count - full_height;
for _ in 0..shift.as_usize() {
term.write_line("")?;
}
Expand Down

0 comments on commit 199cdce

Please sign in to comment.