aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-04-17 18:33:08 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-04-17 18:33:08 +0000
commite37aa3b369b67456f490102c455b6c16367f8e02 (patch)
tree3f8145a008450f4e2f2f5a802ddba6bfe3e8ba33
parentgrid: grid_reflow() now translates cursor coordinates (diff)
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.
-rw-r--r--grid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/grid.c b/grid.c
index b8659b55..9276eb04 100644
--- a/grid.c
+++ b/grid.c
@@ -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);