From 54c500b230c8fbf3def1ff3fbc4020b1a56df550 Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Thu, 25 Feb 2021 18:20:01 +0100 Subject: [PATCH] fix(grid): do not crash when reflowing lines with an empty top buffer (#211) --- src/client/panes/grid.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/panes/grid.rs b/src/client/panes/grid.rs index a13fe204..7651bdc0 100644 --- a/src/client/panes/grid.rs +++ b/src/client/panes/grid.rs @@ -70,6 +70,10 @@ fn transfer_rows_down( } None => vec![Row::from_rows(next_lines)], }; + if next_lines.is_empty() { + // no more lines at source, the line we popped was probably empty + break; + } } None => break, // no more rows }