diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-04-09 21:30:03 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-04-09 21:30:03 +0100 |
commit | fe44f90e5b757dc2aa1e5fdafca6d04b4e0c85f3 (patch) | |
tree | 756d0e08c92e2cabf2bb2d56b7be9e53f079433a | |
parent | 031e9bc8541c4b29f83d76e57bad5d9f5053698f (diff) | |
download | rtmux-fe44f90e5b757dc2aa1e5fdafca6d04b4e0c85f3.tar.gz rtmux-fe44f90e5b757dc2aa1e5fdafca6d04b4e0c85f3.tar.bz2 rtmux-fe44f90e5b757dc2aa1e5fdafca6d04b4e0c85f3.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); |