From 04a1fc9d36d78fed7a67a180cc7feb3551a5b851 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 22 Mar 2019 09:33:04 +0000 Subject: [PATCH 1/3] I forgot to document resize-window, window-size and default-size; reminded by okan@. --- tmux.1 | 65 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/tmux.1 b/tmux.1 index 8d8c3c00..7b4b65ab 100644 --- a/tmux.1 +++ b/tmux.1 @@ -625,13 +625,13 @@ refers to a .Nm command, passed with the command and arguments separately, for example: .Bd -literal -offset indent -bind-key F1 set-window-option force-width 81 +bind-key F1 set-option status off .Ed .Pp Or if using .Xr sh 1 : .Bd -literal -offset indent -$ tmux bind-key F1 set-window-option force-width 81 +$ tmux bind-key F1 set-option status off .Ed .Pp Multiple commands may be specified together as part of a @@ -1939,6 +1939,38 @@ and unzoomed (its normal position in the layout). .Fl M begins mouse resizing (only valid if bound to a mouse key binding, see .Sx MOUSE SUPPORT ) . +.It Xo Ic resize-window +.Op Fl aADLRU +.Op Fl t Ar target-window +.Op Fl x Ar width +.Op Fl y Ar height +.Op Ar adjustment +.Xc +.D1 (alias: Ic resizew ) +Resize a window, up, down, left or right by +.Ar adjustment +with +.Fl U , +.Fl D , +.Fl L +or +.Fl R , +or +to an absolute size +with +.Fl x +or +.Fl y . +The +.Ar adjustment +is given in lines or cells (the default is 1). +.Fl A +sets the size of the largest session containing the window; +.Fl a +the size of the smallest. +This command will automatically set +.Ic window-size +to manual in the window options. .It Xo Ic respawn-pane .Op Fl c Ar start-directory .Op Fl k @@ -2698,6 +2730,10 @@ or This option should be configured when .Nm is used as a login shell. +.It Ic default-size Ar XxY +Set the default size of windows when the size is not set or the +.Ic window-size +option is manual. .It Xo Ic destroy-unattached .Op Ic on | off .Xc @@ -3098,16 +3134,6 @@ Set clock colour. .Xc Set clock hour format. .Pp -.It Ic force-height Ar height -.It Ic force-width Ar width -Prevent -.Nm -from resizing a window to greater than -.Ar width -or -.Ar height . -A value of zero restores the default unlimited setting. -.Pp .It Ic main-pane-height Ar height .It Ic main-pane-width Ar width Set the width or height of the main (left or top) pane in the @@ -3295,6 +3321,21 @@ see the .Sx STYLES section. .Pp +.It Xo Ic window-size +.Op Ic smallest | largest | manual +.Xc +Tell +.Nm +how to automatically size windows either the size of the smallest session +containing the window, the size of the largest, or manual size. +See also the +.Ic resize-window +command and the +.Ic default-size +and +.Ic aggressive-resize +options. +.Pp .It Xo Ic wrap-search .Op Ic on | off .Xc From b4a301f8feef6f2fef99988688b27e2aec898bae Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 22 Mar 2019 10:45:17 +0000 Subject: [PATCH 2/3] Clarify that styles can be space or comma separated, from Stephen Zapatka. --- tmux.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmux.1 b/tmux.1 index 7b4b65ab..fc136de6 100644 --- a/tmux.1 +++ b/tmux.1 @@ -3899,7 +3899,7 @@ and A style may be the single term .Ql default to specify the default style (which may inherit from another option) or a space -separated list of the following: +or comma separated list of the following: .Bl -tag -width Ds .It Ic fg=colour Set the foreground colour. @@ -4000,7 +4000,7 @@ is a window index. .Pp Examples are: .Bd -literal -offset indent -fg=yellow,bold,underscore,blink +fg=yellow bold underscore blink bg=black,fg=default,noreverse .Ed .Sh NAMES AND TITLES From 517d673dbe4b7b5ab290203868d871a712624446 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 25 Mar 2019 09:22:09 +0000 Subject: [PATCH 3/3] Ignore mouse on status line which are not part of a range, GitHub issue 1649. --- server-client.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server-client.c b/server-client.c index eee5dff5..6ef34f83 100644 --- a/server-client.c +++ b/server-client.c @@ -506,14 +506,13 @@ have_event: m->statusat = status_at_line(c); if (m->statusat != -1 && y >= (u_int)m->statusat && - y < m->statusat + status_line_size(c)) + y < m->statusat + status_line_size(c)) { sr = status_get_range(c, x, y - m->statusat); - else - sr = NULL; - if (sr != NULL) { + if (sr == NULL) + return (KEYC_UNKNOWN); switch (sr->type) { case STYLE_RANGE_NONE: - break; + return (KEYC_UNKNOWN); case STYLE_RANGE_LEFT: where = STATUS_LEFT; break; @@ -522,10 +521,11 @@ have_event: break; case STYLE_RANGE_WINDOW: wl = winlink_find_by_index(&s->windows, sr->argument); - if (wl != NULL) { - m->w = wl->window->id; - where = STATUS; - } + if (wl == NULL) + return (KEYC_UNKNOWN); + m->w = wl->window->id; + + where = STATUS; break; } }