aboutsummaryrefslogtreecommitdiff
path: root/grid.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-06-30 17:37:01 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-06-30 17:37:01 +0000
commit37f094280b06cf207b5720fa1a36ff7199225e6b (patch)
treedc53979f6b05a516e23fa29e28b43370b991b042 /grid.c
parentinput: don’t ignore keyboard enter/leave events when there’s no keymap (diff)
Revert "grid: invert the default value of ‘linebreak’, from false to true"
This reverts commit cdd46cdf85b1087ac7465c646bb05078f1bbe85b.
Diffstat (limited to 'grid.c')
-rw-r--r--grid.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/grid.c b/grid.c
index a21f24a2..18ca1457 100644
--- a/grid.c
+++ b/grid.c
@@ -318,7 +318,7 @@ grid_row_alloc(int cols, bool initialize)
{
struct row *row = xmalloc(sizeof(*row));
row->dirty = false;
- row->linebreak = true;
+ row->linebreak = false;
row->extra = NULL;
row->prompt_marker = false;
@@ -538,7 +538,7 @@ _line_wrap(struct grid *old_grid, struct row **new_grid, struct row *row,
} else {
/* Scrollback is full, need to re-use a row */
grid_row_reset_extra(new_row);
- new_row->linebreak = true;
+ new_row->linebreak = false;
new_row->prompt_marker = false;
tll_foreach(old_grid->sixel_images, it) {
@@ -878,14 +878,6 @@ grid_resize_and_reflow(
&new_row->cells[new_col_idx], &old_row->cells[from],
amount * sizeof(struct cell));
- /*
- * We’ve “printed” to this line - reset linebreak.
- *
- * If the old line ends with a hard linebreak, we’ll
- * set linebreak=true on the last new row we print to.
- */
- new_row->linebreak = false;
-
count -= amount;
from += amount;
new_col_idx += amount;
@@ -944,7 +936,7 @@ grid_resize_and_reflow(
}
- if (old_row->linebreak && col_count > 0) {
+ if (old_row->linebreak) {
/* Erase the remaining cells */
memset(&new_row->cells[new_col_idx], 0,
(new_cols - new_col_idx) * sizeof(new_row->cells[0]));