aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2022-02-03 10:07:11 +0000
committernicm <nicm>2022-02-03 10:07:11 +0000
commit948d2fad0ae9723263554115164c412aa095fe7a (patch)
treed64a978ed33d8e56af999db3d02a162e0b9cfb83
parentc401c91ad9f1ef8ea50b11762856a458de525bf9 (diff)
downloadrtmux-948d2fad0ae9723263554115164c412aa095fe7a.tar.gz
rtmux-948d2fad0ae9723263554115164c412aa095fe7a.tar.bz2
rtmux-948d2fad0ae9723263554115164c412aa095fe7a.zip
Use format_draw for command prompt prefix to allow styles, GitHub issue
3054.
-rw-r--r--status.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/status.c b/status.c
index bb57b3d6..79033242 100644
--- a/status.c
+++ b/status.c
@@ -718,7 +718,7 @@ status_prompt_redraw(struct client *c)
memcpy(&cursorgc, &gc, sizeof cursorgc);
cursorgc.attr ^= GRID_ATTR_REVERSE;
- start = screen_write_strlen("%s", c->prompt_string);
+ start = format_width(c->prompt_string);
if (start > c->tty.sx)
start = c->tty.sx;
@@ -728,7 +728,7 @@ status_prompt_redraw(struct client *c)
for (offset = 0; offset < c->tty.sx; offset++)
screen_write_putc(&ctx, &gc, ' ');
screen_write_cursormove(&ctx, 0, lines - 1, 0);
- screen_write_nputs(&ctx, start, &gc, "%s", c->prompt_string);
+ format_draw(&ctx, &gc, start, c->prompt_string, NULL, 0);
screen_write_cursormove(&ctx, start, lines - 1, 0);
left = c->tty.sx - start;