diff options
author | Tiago Cunha <tcunha@gmx.com> | 2011-08-25 21:13:45 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2011-08-25 21:13:45 +0000 |
commit | d390a90bf081efc589b4d3e1f8a570e8f12be3d1 (patch) | |
tree | baf3752857f315cb073cdc1b172efc54225b2f65 | |
parent | c41a93d130ef339659fb4384aec13f33921f91f2 (diff) | |
download | rtmux-d390a90bf081efc589b4d3e1f8a570e8f12be3d1.tar.gz rtmux-d390a90bf081efc589b4d3e1f8a570e8f12be3d1.tar.bz2 rtmux-d390a90bf081efc589b4d3e1f8a570e8f12be3d1.zip |
Sync OpenBSD patchset 950:
Add pane-base-index option, from Ben Barbour.
-rw-r--r-- | options-table.c | 7 | ||||
-rw-r--r-- | tmux.1 | 7 | ||||
-rw-r--r-- | window.c | 4 |
3 files changed, 15 insertions, 3 deletions
diff --git a/options-table.c b/options-table.c index d289ca21..0832117b 100644 --- a/options-table.c +++ b/options-table.c @@ -522,6 +522,13 @@ const struct options_table_entry window_options_table[] = { .default_num = 0 }, + { .name = "pane-base-index", + .type = OPTIONS_TABLE_NUMBER, + .minimum = 0, + .maximum = USHRT_MAX, + .default_num = 0 + }, + { .name = "remain-on-exit", .type = OPTIONS_TABLE_FLAG, .default_num = 0 @@ -14,7 +14,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 16 2011 $ +.Dd $Mdocdate: August 24 2011 $ .Dt TMUX 1 .Os .Sh NAME @@ -2422,6 +2422,11 @@ but set the width of other panes in the .Ic main-vertical layout. .Pp +.It Ic pane-base-index Ar index +Like +.Ic base-index , +but set the starting index for pane numbers. +.Pp .It Xo Ic remain-on-exit .Op Ic on | off .Xc @@ -451,7 +451,7 @@ window_pane_at_index(struct window *w, u_int idx) struct window_pane *wp; u_int n; - n = 0; + n = options_get_number(&w->options, "pane-base-index"); TAILQ_FOREACH(wp, &w->panes, entry) { if (n == idx) return (wp); @@ -489,7 +489,7 @@ window_pane_index(struct window *w, struct window_pane *wp) struct window_pane *wq; u_int n; - n = 0; + n = options_get_number(&w->options, "pane-base-index"); TAILQ_FOREACH(wq, &w->panes, entry) { if (wp == wq) break; |