Ensure at least one line is in Buffer
This commit is contained in:
parent
0cfd9b64ef
commit
10d5888d11
1 changed files with 8 additions and 0 deletions
|
|
@ -616,6 +616,14 @@ impl Buffer {
|
|||
shaping,
|
||||
));
|
||||
}
|
||||
if self.lines.is_empty() {
|
||||
self.lines.push(BufferLine::new(
|
||||
"",
|
||||
LineEnding::default(),
|
||||
AttrsList::new(attrs),
|
||||
shaping,
|
||||
));
|
||||
}
|
||||
self.scroll = Scroll::default();
|
||||
self.shape_until_scroll(font_system, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue