mirror of
https://github.com/tmux/tmux.git
synced 2026-10-13 22:34:23 +00:00
Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master: Add a function to find last pane index, from Dane Jensen. Add a parser for a subset of JSON, will be used for new layout strings (and maybe some other stuff), from Dane Jensen. Add capture-pane -I to show times.
This commit is contained in:
17
window.c
17
window.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: window.c,v 1.373 2026/08/24 21:17:19 nicm Exp $ */
|
||||
/* $OpenBSD: window.c,v 1.374 2026/09/08 08:37:56 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -1255,6 +1255,21 @@ window_pane_zindex(struct window_pane *wp, u_int *i)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
int
|
||||
window_pane_last_index(struct window_pane *wp, u_int *i)
|
||||
{
|
||||
struct window *w = wp->window;
|
||||
struct window_pane *wq;
|
||||
|
||||
*i = 0;
|
||||
TAILQ_FOREACH(wq, &w->last_panes, sentry) {
|
||||
if (wq == wp)
|
||||
return (0);
|
||||
(*i)++;
|
||||
}
|
||||
return (-1);
|
||||
}
|
||||
|
||||
u_int
|
||||
window_count_panes(struct window *w, int with_floating)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user