Fix crash on small screens
Some checks failed
CI / lint (push) Failing after 28s
CI / Build and test (, 1.76.0) (push) Successful in 3m31s
CI / Build and test (, beta) (push) Successful in 3m25s
CI / Build and test (, nightly) (push) Successful in 56s

This commit is contained in:
2024-02-11 11:41:15 +01:00
parent df4134829b
commit 5f38edcb3b

View File

@ -171,7 +171,7 @@ impl Component for Buflist {
let column_width = self.config.layout.buflist.column_width;
for col in 0..max_columns {
let x = area.y + col * column_width;
let allow_overflow = if col == max_columns - 2 {
let allow_overflow = if col == max_columns.saturating_sub(2) {
self.config.layout.buflist.penultimate_right_overflow
} else if col == max_columns - 1 {
// Always allow the last column to overflow