mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-12 05:34:01 -04:00
term: command_output_to_text(): don’t skip FTCS_COMMAND_FINISHED on last row
This commit is contained in:
parent
1393942de3
commit
d5308a0493
1 changed files with 6 additions and 2 deletions
|
|
@ -3692,9 +3692,10 @@ term_command_output_to_text(const struct terminal *term, char **text, size_t *le
|
||||||
|
|
||||||
const struct grid *grid = term->grid;
|
const struct grid *grid = term->grid;
|
||||||
const int sb_end = grid_row_absolute(grid, term->rows - 1);
|
const int sb_end = grid_row_absolute(grid, term->rows - 1);
|
||||||
int r = (sb_end - 1 + grid->num_rows) & (grid->num_rows - 1);
|
const int sb_start = (sb_end + 1) & (grid->num_rows - 1);
|
||||||
|
int r = sb_end;
|
||||||
|
|
||||||
while (start_row < 0 && r != sb_end) {
|
while (start_row < 0) {
|
||||||
const struct row *row = grid->rows[r];
|
const struct row *row = grid->rows[r];
|
||||||
if (row == NULL)
|
if (row == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
@ -3709,6 +3710,9 @@ term_command_output_to_text(const struct terminal *term, char **text, size_t *le
|
||||||
start_col = row->shell_integration.cmd_start;
|
start_col = row->shell_integration.cmd_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (r == sb_start)
|
||||||
|
break;
|
||||||
|
|
||||||
r = (r - 1 + grid->num_rows) & (grid->num_rows - 1);
|
r = (r - 1 + grid->num_rows) & (grid->num_rows - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue