Wrap long lines and limit empty-line reflow consumption to OSC 133 lines.

Only consume an empty, unwrapped continuation line in grid_reflow_join
when it carries OSC 133 markers, so reflow of lines without markers is
unchanged. Also wrap lines over 80 columns and restore the original
PANE_REDRAW condition in window_copy_copy_buffer.
This commit is contained in:
Michael Grant
2026-10-06 17:57:30 +02:00
parent 02f09554c9
commit 3959fc4d82
2 changed files with 25 additions and 11 deletions

19
grid.c
View File

@@ -1361,10 +1361,18 @@ grid_reflow_move_osc133(struct grid_line *to, struct grid_line *from,
{
struct osc133_data *src = &from->osc133_data;
struct osc133_data *dst = &to->osc133_data;
u_short *src_col[] = { &src->prompt_col, &src->cmd_col,
&src->out_start_col, &src->out_end_col };
u_short *dst_col[] = { &dst->prompt_col, &dst->cmd_col,
&dst->out_start_col, &dst->out_end_col };
u_short *src_col[] = {
&src->prompt_col,
&src->cmd_col,
&src->out_start_col,
&src->out_end_col
};
u_short *dst_col[] = {
&dst->prompt_col,
&dst->cmd_col,
&dst->out_start_col,
&dst->out_end_col
};
u_int flags[] = {
GRID_LINE_START_PROMPT|GRID_LINE_SECOND_PROMPT,
GRID_LINE_START_COMMAND,
@@ -1435,6 +1443,9 @@ grid_reflow_join(struct grid *target, struct grid *gd, u_int sx, u_int yy,
if (~gd->linedata[line].flags & GRID_LINE_WRAPPED)
wrapped = 0;
if (gd->linedata[line].cellused == 0) {
if (!wrapped && (gd->linedata[line].flags &
GRID_LINE_OSC133_FLAGS) == 0)
break;
from = &gd->linedata[line];
want = 0;
range.offset = at;