mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 22:43:58 +00:00
Both the two previous ways of navigating panes by direction have
irritating flaws: a) The old way of always using the top or left if the choice is ambiguous is annoying when the layout is unbalanced. b) The new way of remembering the last used pane is annoying if the layout is balanced and the leftmost is obvious to the user (because clearly if we go right from the top-left in a tiled set of four we want to end up in top-right, even if we were last using the bottom-right). So instead, use a combination of both: if there is only one possible pane alongside the current pane, move to it, otherwise choose the most recently used of the choice.
This commit is contained in:
4
tmux.h
4
tmux.h
@ -892,6 +892,7 @@ struct window_choose_mode_item {
|
||||
/* Child window structure. */
|
||||
struct window_pane {
|
||||
u_int id;
|
||||
u_int active_point;
|
||||
|
||||
struct window *window;
|
||||
|
||||
@ -948,6 +949,7 @@ struct window_pane {
|
||||
};
|
||||
TAILQ_HEAD(window_panes, window_pane);
|
||||
RB_HEAD(window_pane_tree, window_pane);
|
||||
ARRAY_DECL(window_pane_list, struct window_pane *);
|
||||
|
||||
/* Window structure. */
|
||||
struct window {
|
||||
@ -1025,8 +1027,6 @@ struct layout_cell {
|
||||
u_int yoff;
|
||||
|
||||
struct window_pane *wp;
|
||||
struct window_pane *lastwp;
|
||||
|
||||
struct layout_cells cells;
|
||||
|
||||
TAILQ_ENTRY(layout_cell) entry;
|
||||
|
Reference in New Issue
Block a user