mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-22 22:26:54 +03:00
fix(compatibility): don't crash on invalid state when padding line (#1285)
This commit is contained in:
parent
8ab6873ba6
commit
b4e113c6a4
@ -1066,6 +1066,9 @@ impl Grid {
|
||||
}
|
||||
|
||||
fn pad_current_line_until(&mut self, position: usize) {
|
||||
if self.viewport.get(self.cursor.y).is_none() {
|
||||
self.pad_lines_until(self.cursor.y, EMPTY_TERMINAL_CHARACTER);
|
||||
}
|
||||
let current_row = self.viewport.get_mut(self.cursor.y).unwrap();
|
||||
for _ in current_row.width()..position {
|
||||
current_row.push(EMPTY_TERMINAL_CHARACTER);
|
||||
|
Loading…
Reference in New Issue
Block a user