mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
grid: resize without reflow: truncate shell_integration.cmd_{start,end}
This ensures the cmd start/end columns are valid in the new grid.
This commit is contained in:
parent
d5308a0493
commit
110a6dd6f0
1 changed files with 3 additions and 1 deletions
4
grid.c
4
grid.c
|
|
@ -427,7 +427,9 @@ grid_resize_without_reflow(
|
|||
|
||||
new_row->dirty = old_row->dirty;
|
||||
new_row->linebreak = false;
|
||||
new_row->shell_integration = old_row->shell_integration;
|
||||
new_row->shell_integration.prompt_marker = old_row->shell_integration.prompt_marker;
|
||||
new_row->shell_integration.cmd_start = min(old_row->shell_integration.cmd_start, new_cols - 1);
|
||||
new_row->shell_integration.cmd_end = min(old_row->shell_integration.cmd_end, new_cols - 1);
|
||||
|
||||
if (new_cols > old_cols) {
|
||||
/* Clear "new" columns */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue