diff options
author | 2019-04-17 14:41:08 +0000 | |
---|---|---|
committer | 2019-04-17 14:41:08 +0000 | |
commit | af947beae22364dd977b373091de1ac11271c560 (patch) | |
tree | 9ec6ae833436d80272ce7b699c441ff4103212ba | |
parent | Document that switch-client can change all of session,window,pane and (diff) | |
download | wireguard-openbsd-af947beae22364dd977b373091de1ac11271c560.tar.xz wireguard-openbsd-af947beae22364dd977b373091de1ac11271c560.zip |
Do not let the size of the pane status screen go negative.
-rw-r--r-- | usr.bin/tmux/screen-redraw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/screen-redraw.c b/usr.bin/tmux/screen-redraw.c index 5f4047fa95d..80db9362b15 100644 --- a/usr.bin/tmux/screen-redraw.c +++ b/usr.bin/tmux/screen-redraw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-redraw.c,v 1.59 2019/03/18 20:53:33 nicm Exp $ */ +/* $OpenBSD: screen-redraw.c,v 1.60 2019/04/17 14:41:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); |