mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Sync OpenBSD patchset 950:
Add pane-base-index option, from Ben Barbour.
This commit is contained in:
parent
c41a93d130
commit
d390a90bf0
@ -522,6 +522,13 @@ const struct options_table_entry window_options_table[] = {
|
|||||||
.default_num = 0
|
.default_num = 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ .name = "pane-base-index",
|
||||||
|
.type = OPTIONS_TABLE_NUMBER,
|
||||||
|
.minimum = 0,
|
||||||
|
.maximum = USHRT_MAX,
|
||||||
|
.default_num = 0
|
||||||
|
},
|
||||||
|
|
||||||
{ .name = "remain-on-exit",
|
{ .name = "remain-on-exit",
|
||||||
.type = OPTIONS_TABLE_FLAG,
|
.type = OPTIONS_TABLE_FLAG,
|
||||||
.default_num = 0
|
.default_num = 0
|
||||||
|
7
tmux.1
7
tmux.1
@ -14,7 +14,7 @@
|
|||||||
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||||
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" 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
|
.Dt TMUX 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -2422,6 +2422,11 @@ but set the width of other panes in the
|
|||||||
.Ic main-vertical
|
.Ic main-vertical
|
||||||
layout.
|
layout.
|
||||||
.Pp
|
.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
|
.It Xo Ic remain-on-exit
|
||||||
.Op Ic on | off
|
.Op Ic on | off
|
||||||
.Xc
|
.Xc
|
||||||
|
4
window.c
4
window.c
@ -451,7 +451,7 @@ window_pane_at_index(struct window *w, u_int idx)
|
|||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
u_int n;
|
u_int n;
|
||||||
|
|
||||||
n = 0;
|
n = options_get_number(&w->options, "pane-base-index");
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (n == idx)
|
if (n == idx)
|
||||||
return (wp);
|
return (wp);
|
||||||
@ -489,7 +489,7 @@ window_pane_index(struct window *w, struct window_pane *wp)
|
|||||||
struct window_pane *wq;
|
struct window_pane *wq;
|
||||||
u_int n;
|
u_int n;
|
||||||
|
|
||||||
n = 0;
|
n = options_get_number(&w->options, "pane-base-index");
|
||||||
TAILQ_FOREACH(wq, &w->panes, entry) {
|
TAILQ_FOREACH(wq, &w->panes, entry) {
|
||||||
if (wp == wq)
|
if (wp == wq)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user