aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2021-02-25 18:20:01 +0100
committerGitHub <noreply@github.com>2021-02-25 18:20:01 +0100
commit54c500b230c8fbf3def1ff3fbc4020b1a56df550 (patch)
tree0f8b288b83ef008edf839b9d6cf95d46bc59947a /src/client
parentFix vim background color (#210) (diff)
downloadsl0ppij-54c500b230c8fbf3def1ff3fbc4020b1a56df550.tar.gz
sl0ppij-54c500b230c8fbf3def1ff3fbc4020b1a56df550.tar.xz
sl0ppij-54c500b230c8fbf3def1ff3fbc4020b1a56df550.zip
fix(grid): do not crash when reflowing lines with an empty top buffer (#211)
Diffstat (limited to 'src/client')
-rw-r--r--src/client/panes/grid.rs4
1 files changed, 4 insertions, 0 deletions
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
}