Make pane/window wrapping more logical (so with 10 windows, +10 from

window 5 stays in the same place), and tidy the code. From Tiago Cunha.
This commit is contained in:
Nicholas Marriott
2010-07-14 18:37:49 +00:00
parent b9c873cdaa
commit 43355fa75c
3 changed files with 113 additions and 85 deletions

10
tmux.h
View File

@ -1825,8 +1825,10 @@ struct winlink *winlink_add(struct winlinks *, struct window *, int);
void winlink_remove(struct winlinks *, struct winlink *);
struct winlink *winlink_next(struct winlink *);
struct winlink *winlink_previous(struct winlink *);
struct winlink *winlink_next_by_number(struct winlink *, int);
struct winlink *winlink_previous_by_number(struct winlink *, int);
struct winlink *winlink_next_by_number(struct winlink *, struct session *,
int);
struct winlink *winlink_previous_by_number(struct winlink *, struct session *,
int);
void winlink_stack_push(struct winlink_stack *, struct winlink *);
void winlink_stack_remove(struct winlink_stack *, struct winlink *);
int window_index(struct window *, u_int *);
@ -1841,6 +1843,10 @@ struct window_pane *window_add_pane(struct window *, u_int);
void window_resize(struct window *, u_int, u_int);
void window_remove_pane(struct window *, struct window_pane *);
struct window_pane *window_pane_at_index(struct window *, u_int);
struct window_pane *window_pane_next_by_number(struct window *,
struct window_pane *, u_int);
struct window_pane *window_pane_previous_by_number(struct window *,
struct window_pane *, u_int);
u_int window_pane_index(struct window *, struct window_pane *);
u_int window_count_panes(struct window *);
void window_destroy_panes(struct window *);