mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-13 05:33:51 -04:00
grid: change default value of linebreak to true
This way, all lines are treated as having a hard linebreak, until it's cleared when we do an auto-wrap. This change alone causes issues when reflowing text, as now all trailing lines in an otherwise empty window are treated as hard linebreaks, causing the new grid to insert lots of unwanted, empty lines. Fix by doing two things: * *clear* the linebreak flag when we pull in new lines for the new grid. We only want to set it explicitly, when an old row has its linebreak flag set. * Coalesce empty lines with linebreak=true, and only "emit" them as new liens in the new grid if they are followed by non-empty lines.
This commit is contained in:
parent
a80b32d006
commit
7b6efcf19a
2 changed files with 61 additions and 28 deletions
|
|
@ -2057,7 +2057,7 @@ static inline void
|
|||
erase_line(struct terminal *term, struct row *row)
|
||||
{
|
||||
erase_cell_range(term, row, 0, term->cols - 1);
|
||||
row->linebreak = false;
|
||||
row->linebreak = true;
|
||||
row->shell_integration.prompt_marker = false;
|
||||
row->shell_integration.cmd_start = -1;
|
||||
row->shell_integration.cmd_end = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue