grid: reflow: don't randomly insert hard linebreaks

Not sure why I added this code; maybe to workaround issues caused by
the fact that the cursor position wasn't properly translated.
This commit is contained in:
Daniel Eklöf 2020-04-17 20:33:08 +02:00
parent 5546b40369
commit e37aa3b369
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
grid.c
View file

@ -157,6 +157,7 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols,
/* Out of columns on current row in new grid? */
if (new_col_idx >= new_cols) {
#if 0
/*
* If last cell on last row and first cell on new
* row are non-empty, wrap the line, otherwise
@ -167,6 +168,7 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols,
{
new_row->linebreak = true;
}
#endif
new_col_idx = 0;
new_row_idx = (new_row_idx + 1) & (new_rows - 1);