diff options
author | nicm <nicm> | 2019-04-17 14:41:08 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-04-17 14:41:08 +0000 |
commit | e3b1358bbc616c1ba95414d6102c23bfcaa37687 (patch) | |
tree | 63f3832341c0a0fe89102e836765f9c21d9b0fbb | |
parent | 5943cd1907d20381c527d4b3b338df090cbbb1de (diff) | |
download | rtmux-e3b1358bbc616c1ba95414d6102c23bfcaa37687.tar.gz rtmux-e3b1358bbc616c1ba95414d6102c23bfcaa37687.tar.bz2 rtmux-e3b1358bbc616c1ba95414d6102c23bfcaa37687.zip |
Do not let the size of the pane status screen go negative.
-rw-r--r-- | screen-redraw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/screen-redraw.c b/screen-redraw.c index 691b2194..0ce3374d 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -290,7 +290,10 @@ screen_redraw_make_pane_status(struct client *c, struct window *w, format_defaults(ft, c, NULL, NULL, wp); expanded = format_expand_time(ft, fmt); - wp->status_size = width = wp->sx - 4; + if (wp->sx < 4) + wp->status_size = width = 0; + else + wp->status_size = width = wp->sx - 4; memcpy(&old, &wp->status_screen, sizeof old); screen_init(&wp->status_screen, width, 1, 0); |