Skip to content

Commit

Permalink
fix: Display not being updated for single row updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AMythicDev committed Mar 11, 2024
1 parent 463ef29 commit 69b3133
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ where
opts.search_term,
);
fr.lines_to_row_map.insert(formatted_row_count, true);
formatted_row_count += last_line.len();
if lines.last().unwrap().1.len() > fr.max_line_length {
fr.max_line_length = lines.last().unwrap().1.len();
}
Expand Down
9 changes: 4 additions & 5 deletions src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,10 @@ impl PagerState {
return AppendStyle::FullRedraw;
}

let total_rows = self.screen.line_count();
let fmt_lines = &self.screen.get_formatted_lines_with_bounds(
total_rows - append_result.rows_formatted,
total_rows - 1,
);
let total_rows = self.screen.formatted_lines_count();
let fmt_lines = &self
.screen
.get_formatted_lines_with_bounds(total_rows - append_result.rows_formatted, total_rows);
AppendStyle::PartialUpdate(fmt_lines)
}
}

0 comments on commit 69b3133

Please sign in to comment.