diff --git a/src/popups/blame_file.rs b/src/popups/blame_file.rs index b7d1304b33..a0d7cd53a4 100644 --- a/src/popups/blame_file.rs +++ b/src/popups/blame_file.rs @@ -158,23 +158,7 @@ impl DrawableComponent for BlameFilePopup { f, area, &self.theme, - // April 2021: `draw_scrollbar` assumes that the last parameter - // is `scroll_top`. Therefore, it subtracts the area’s height - // before calculating the position of the scrollbar. To account - // for that, we add the current height. - number_of_rows + (area.height as usize), - // April 2021: we don’t have access to `table_state.offset` - // (it’s private), so we use `table_state.selected()` as a - // replacement. - // - // Other widgets, for example `BranchListComponent`, manage - // scroll state themselves and use `self.scroll_top` in this - // situation. - // - // There are plans to change `render_stateful_widgets`, so this - // might be acceptable as an interim solution. - // - // https://github.com/fdehau/tui-rs/issues/448 + number_of_rows.saturating_sub(1), table_state.selected().unwrap_or(0), ui::Orientation::Vertical, );