From abb7108e25ab40753a1aa352b5f03f651bd3619e Mon Sep 17 00:00:00 2001 From: Michael Grant Date: Tue, 21 Jul 2026 07:42:20 +0100 Subject: [PATCH] Add vertical bar next to expanded lines. --- tty-acs.c | 2 -- window-copy.c | 32 ++++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/tty-acs.c b/tty-acs.c index 62a7148f2..eedb79c2f 100644 --- a/tty-acs.c +++ b/tty-acs.c @@ -34,8 +34,6 @@ static const struct tty_acs_entry tty_acs_table[] = { { '-', "\342\206\221" }, /* arrow pointing up */ { '.', "\342\206\223" }, /* arrow pointing down */ { '0', "\342\226\256" }, /* solid square block */ - { '>', "\342\206\222" }, /* arrow pointing right */ - { 'V', "\342\206\223" }, /* arrow pointing down */ { '`', "\342\227\206" }, /* diamond */ { 'a', "\342\226\222" }, /* checker board (stipple) */ { 'b', "\342\220\211" }, diff --git a/window-copy.c b/window-copy.c index 950f88c6f..1e45db59e 100644 --- a/window-copy.c +++ b/window-copy.c @@ -6081,18 +6081,33 @@ window_copy_write_line(struct window_mode_entry *wme, } if (gutter_width != 0) { struct grid_cell control_gc; + struct window_copy_line *line, *next; char control = ' '; - if (data->lines != NULL && backing_y < data->line_count && - data->lines[backing_y].flags & WINDOW_COPY_LINE_CONTROL) { - if (data->lines[backing_y].flags & + line = NULL; + if (data->lines != NULL && backing_y < data->line_count) + line = &data->lines[backing_y]; + if (line != NULL && + line->flags & WINDOW_COPY_LINE_CONTROL) { + if (line->flags & WINDOW_COPY_LINE_INITIAL) - control = data->top_output ? '>' : 'V'; + control = data->top_output ? '+' : '-'; else if (data->outputs[ - data->lines[backing_y].output_line]) - control = '>'; + line->output_line]) + control = '+'; else - control = 'V'; + control = '-'; + } else if (line != NULL && + line->flags & WINDOW_COPY_LINE_MEMBER) { + next = NULL; + if (backing_y + 1 < data->line_count) + next = &data->lines[backing_y + 1]; + if (next == NULL || + ~(next->flags) & WINDOW_COPY_LINE_MEMBER || + next->output_line != line->output_line) + control = 'm'; /* ACS L character */ + else + control = 'x'; /* ACS | character */ } screen_write_cursormove(ctx, line_width, py, 0); screen_write_putc(ctx, current ? &cur_ln_gc : &ln_gc, ' '); @@ -6101,7 +6116,8 @@ window_copy_write_line(struct window_mode_entry *wme, else { memcpy(&control_gc, current ? &cur_ln_gc : &ln_gc, sizeof control_gc); - control_gc.attr |= GRID_ATTR_CHARSET; + if (control == 'x' || control == 'm') + control_gc.attr |= GRID_ATTR_CHARSET; screen_write_putc(ctx, &control_gc, control); } screen_write_putc(ctx, current ? &cur_ln_gc : &ln_gc, ' ');