Put the prompt cursor attributes into the status line screen and use

that rather than updating the current screen (since there might not be
one).
This commit is contained in:
nicm
2024-10-08 06:29:44 +00:00
parent 735082b7c2
commit 00412b570b
2 changed files with 22 additions and 30 deletions

View File

@ -736,7 +736,7 @@ status_prompt_redraw(struct client *c)
struct screen_write_ctx ctx;
struct session *s = c->session;
struct screen old_screen;
u_int i, lines, offset, left, start, width;
u_int i, lines, offset, left, start, width, n;
u_int pcursor, pwidth, promptline;
struct grid_cell gc;
struct format_tree *ft;
@ -750,6 +750,12 @@ status_prompt_redraw(struct client *c)
lines = 1;
screen_init(sl->active, c->tty.sx, lines, 0);
n = options_get_number(s->options, "prompt-cursor-colour");
sl->active->default_ccolour = n;
n = options_get_number(s->options, "prompt-cursor-style");
screen_set_cursor_style(n, &sl->active->default_cstyle,
&sl->active->default_mode);
promptline = status_prompt_line_at(c);
if (promptline > lines - 1)
promptline = lines - 1;