From 8aaae25e56a3498c13149f5581808b8b65143bad Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 21 Jul 2026 08:00:39 +0100 Subject: [PATCH] Fix a merge and add test bits. --- regress/input-modes.sh | 19 ++++++++++++++----- screen-write.c | 4 +--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/regress/input-modes.sh b/regress/input-modes.sh index 9bbe44429..8ae905f89 100644 --- a/regress/input-modes.sh +++ b/regress/input-modes.sh @@ -5,11 +5,20 @@ start_pane alternate 10 3 'MAIN\033[?1049hALT\033[?1049lZ\n' check_capture alternate 'MAINZ' -start_pane osc133 10 4 '\033]133;A\007prompt\n\033]133;C\007output\n' -check_capture osc133 'prompt -output' -check_flags osc133 'P prompt -O output' +start_pane osc133 20 8 'xx\033]133;A\007p>\033]133;B\007cmd\nxy\033]133;P;k=s\007more\nzz\033]133;C\007out\033]133;D;7\007\nq\033]133;C\007bad\033]133;D;-1\007\nqq\033]133;C\007big\033]133;D;300\007\nzzz\033]133;C\007ok\033]133;D\007\n' +check_capture osc133 'xxp>cmd +xymore +zzout +qbad +qqbig +zzzok' +check_raw_matches osc133 \ + 'L 0 \(0\) flags=START_PROMPT,START_COMMAND\[[0-9a-f]+\].* osc133=2,4,0,0,0' \ + 'L 1 \(1\) flags=SECOND_PROMPT\[[0-9a-f]+\].* osc133=2,0,0,0,0' \ + 'L 2 \(2\) flags=START_OUTPUT,END_OUTPUT\[[0-9a-f]+\].* osc133=0,0,2,5,7' \ + 'L 3 \(3\) flags=START_OUTPUT,END_OUTPUT\[[0-9a-f]+\].* osc133=0,0,1,4,255' \ + 'L 4 \(4\) flags=START_OUTPUT,END_OUTPUT\[[0-9a-f]+\].* osc133=0,0,2,5,255' \ + 'L 5 \(5\) flags=START_OUTPUT,END_OUTPUT\[[0-9a-f]+\].* osc133=0,0,3,5,0' $TMUX kill-server 2>/dev/null exit $exit_status diff --git a/screen-write.c b/screen-write.c index 8cb6d338c..1b888849f 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1618,9 +1618,7 @@ screen_write_clearline(struct screen_write_ctx *ctx, u_int bg) ctx->wp->flags |= PANE_REDRAW; #endif - flags = gl->flags & - (GRID_LINE_START_PROMPT|GRID_LINE_START_OUTPUT| - GRID_LINE_OSC133_FLAGS); + flags = gl->flags & GRID_LINE_OSC133_FLAGS; memcpy(&od, &gl->osc133_data, sizeof od); grid_view_clear(s->grid, 0, s->cy, sx, 1, bg); gl = grid_get_line(s->grid, s->grid->hsize + s->cy);