mirror of
https://github.com/tmux/tmux.git
synced 2026-10-16 16:44:30 +00:00
Add a vertical (side) status line, GitHub issue 5468 from John DeWyze.
This commit is contained in:
10
resize.c
10
resize.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: resize.c,v 1.61 2026/10/15 22:28:41 nicm Exp $ */
|
||||
/* $OpenBSD: resize.c,v 1.62 2026/10/16 07:59:06 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -196,7 +196,7 @@ clients_calculate_size(int type, int current, struct client *c,
|
||||
if (w == NULL ||
|
||||
!control_get_window_size(loop, w->id, &cx, &cy) ||
|
||||
cx == 0 || cy == 0) {
|
||||
cx = loop->tty.sx;
|
||||
cx = loop->tty.sx - status_side_size(loop);
|
||||
cy = loop->tty.sy - status_line_size(loop);
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ default_window_size(struct client *c, struct session *s, struct window *w,
|
||||
* client and no window, use the default size as for manual type.
|
||||
*/
|
||||
if (type == WINDOW_SIZE_LATEST && c != NULL && !ignore_client_size(c)) {
|
||||
*sx = c->tty.sx;
|
||||
*sx = c->tty.sx - status_side_size(c);
|
||||
*sy = c->tty.sy - status_line_size(c);
|
||||
*xpixel = c->tty.xpixel;
|
||||
*ypixel = c->tty.ypixel;
|
||||
@@ -478,6 +478,10 @@ recalculate_sizes_now(int now)
|
||||
c->flags |= CLIENT_STATUSOFF;
|
||||
else
|
||||
c->flags &= ~CLIENT_STATUSOFF;
|
||||
if (s->sidestatusat != -1 && c->tty.sx <= s->sidestatuswidth)
|
||||
c->flags |= CLIENT_SIDESTATUSOFF;
|
||||
else
|
||||
c->flags &= ~CLIENT_SIDESTATUSOFF;
|
||||
}
|
||||
|
||||
/* Walk each window and adjust the size. */
|
||||
|
||||
Reference in New Issue
Block a user