Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions src/popups/blame_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down