summaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-01-13 21:33:22 +0100
committerLaurenz <laurmaedje@gmail.com>2021-01-13 21:33:22 +0100
commit1b53e27f270e3c040ee095573af9a5243980191a (patch)
tree3ed3e3d17b35cb04ded50a38331438468b61063e /src/layout
parentc36a136e6f26ac99e58465ad072c282fe6dbaedf (diff)
Some minor improvements ♻
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index d09566e3..30026b9f 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -128,7 +128,10 @@ impl Areas {
///
/// If this is false calling `next()` will have no effect.
pub fn in_full_last(&self) -> bool {
- self.backlog.is_empty() && self.last.map_or(true, |size| self.current.rem == size)
+ self.backlog.is_empty()
+ && self.last.map_or(true, |size| {
+ self.current.rem.is_nan() || size.is_nan() || self.current.rem == size
+ })
}
}