Fix OSC 133 output range lookup for markers sharing a line

Handle C and D on the same line, output ending on the next prompt's
line, and output starting on a prompt line. Keep the output columns
when A resets a line's prompt data, and fall back to the previous
output if the range is empty. Extend the regress test to cover these
and reset the paste buffer before each check.
This commit is contained in:
Michael Grant
2026-09-29 10:03:12 +01:00
parent b948e10aac
commit 1eedc4aa24
3 changed files with 102 additions and 22 deletions

View File

@@ -3278,8 +3278,8 @@ input_osc_133(struct input_ctx *ictx, const char *p)
case 'A':
case 'N':
if (gl != NULL) {
memset(&gl->osc133_data, 0, sizeof gl->osc133_data);
gl->osc133_data.prompt_col = s->cx;
gl->osc133_data.cmd_col = 0;
gl->flags |= GRID_LINE_START_PROMPT;
}
if (wp != NULL) {