aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-06-30 17:47:18 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-06-30 17:47:18 +0000
commit0c60bb3f295936dff04f56d28ab5dcb4db898a54 (patch)
treed6bb6fe5d3ee0669d2c8573fbb6b74f36f98dbd2 /input.c
parentRevert "grid: invert the default value of ‘linebreak’, from false to true" (diff)
grid: reflow: require col count > 0 when skipping line truncation
When reflowing the grid, we truncate lines with a hard linebreak after the last non-empty cell. This way we don’t reflow trailing empty cells to a new line when resizing the window to a smaller size. However, “logical” lines (i.e. those without a hard linebreak) are *not* truncated. This is to ensure we don’t trim empty cells in the middle of a logical line spanning multiple physical lines. Since newly allocated rows are initialized with linebreak=false, we need to ensure _those_ are still truncated - otherwise all that empty space under the current prompt will be reflowed. Note that this is a temporary workaround. The correct solution, I think, is to track whether a line has been printed to or not, and simply ignore (not reflow) lines that haven’t yet been touched.
Diffstat (limited to 'input.c')
0 files changed, 0 insertions, 0 deletions