Go to file
nicm 540f0b3e45 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.
2014-05-08 06:03:30 +00:00
arguments.c Don't blindly increase offsets by the return value of snprintf, if there 2014-04-11 19:35:54 +00:00
array.h xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
attributes.c Use snprintf for constructing attribute string, from Tim Ruehsen. 2012-03-17 21:45:25 +00:00
cfg.c Remove some unnecessary includes and fix a typo. 2014-04-17 11:38:35 +00:00
client.c fcntl.h is still needed here. 2014-04-29 22:31:22 +00:00
cmd-attach-session.c Change terminal-overrides to a server option (now that we have them), it 2014-02-23 00:53:06 +00:00
cmd-bind-key.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-break-pane.c Correct the dance to fix the active pane in join-pane by pulling the 2014-04-17 09:13:13 +00:00
cmd-capture-pane.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
cmd-choose-buffer.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
cmd-choose-client.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-choose-tree.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-clear-history.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-clock-mode.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-command-prompt.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-confirm-before.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-copy-mode.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-delete-buffer.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
cmd-detach-client.c Fix detach -a by skipping clients where the session is NULL. 2013-10-15 00:15:11 +00:00
cmd-display-message.c Trivial style and spacing nits. 2013-10-10 12:01:14 +00:00
cmd-display-panes.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-find-window.c Some more long lines. 2014-04-17 14:45:49 +00:00
cmd-has-session.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-if-shell.c Make cmdq->client_exit a tristate (-1 means "not set") so that if 2013-10-10 12:04:38 +00:00
cmd-join-pane.c Correct the dance to fix the active pane in join-pane by pulling the 2014-04-17 09:13:13 +00:00
cmd-kill-pane.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-kill-server.c Merge start-server into kill-server. 2014-01-27 23:57:35 +00:00
cmd-kill-session.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-kill-window.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-link-window.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-list-buffers.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
cmd-list-clients.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-list-commands.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-list-keys.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-list-panes.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-list-sessions.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-list-windows.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-list.c Don't blindly increase offsets by the return value of snprintf, if there 2014-04-11 19:35:54 +00:00
cmd-load-buffer.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
cmd-lock-server.c Remove some unnecessary includes and fix a typo. 2014-04-17 11:38:35 +00:00
cmd-move-window.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-new-session.c Set PATH explicitly, either from client or session 2014-04-17 13:02:59 +00:00
cmd-new-window.c Set PATH explicitly, either from client or session 2014-04-17 13:02:59 +00:00
cmd-paste-buffer.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
cmd-pipe-pane.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-queue.c Remove the "info" message mechanism, this was only used for about five 2014-04-17 07:55:43 +00:00
cmd-refresh-client.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-rename-session.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-rename-window.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-resize-pane.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-respawn-pane.c Set PATH explicitly, either from client or session 2014-04-17 13:02:59 +00:00
cmd-respawn-window.c Set PATH explicitly, either from client or session 2014-04-17 13:02:59 +00:00
cmd-rotate-window.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-run-shell.c Remove the "info" message mechanism, this was only used for about five 2014-04-17 07:55:43 +00:00
cmd-save-buffer.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
cmd-select-layout.c Remove the "info" message mechanism, this was only used for about five 2014-04-17 07:55:43 +00:00
cmd-select-pane.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-select-window.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-send-keys.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-send-prefix.c Make command exec functions return an enum rather than -1/0/1 values and 2012-07-11 07:10:15 +00:00
cmd-set-buffer.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
cmd-set-environment.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-set-option.c Some more long lines. 2014-04-17 14:45:49 +00:00
cmd-show-buffer.c Make command exec functions return an enum rather than -1/0/1 values and 2012-07-11 07:10:15 +00:00
cmd-show-environment.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-show-messages.c Style nit - no space between function name and bracket. 2014-02-14 13:59:01 +00:00
cmd-show-options.c Do not show the -fg, -bg and -attr options. If asked for one explicitly, 2014-04-17 07:43:20 +00:00
cmd-source-file.c Make cmdq->client_exit a tristate (-1 means "not set") so that if 2013-10-10 12:04:38 +00:00
cmd-split-window.c Set PATH explicitly, either from client or session 2014-04-17 13:02:59 +00:00
cmd-string.c Make tilde expansion in command strings work even if it isn't terminated by /. 2013-10-10 12:14:09 +00:00
cmd-suspend-client.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-swap-pane.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-swap-window.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-switch-client.c Remove the "info" message mechanism, this was only used for about five 2014-04-17 07:55:43 +00:00
cmd-unbind-key.c Remove stray return, from Chris Johnsen. 2013-10-11 08:06:03 +00:00
cmd-unlink-window.c Remove the barely-used and unnecessary command check() function. 2013-10-10 12:00:18 +00:00
cmd-wait-for.c Mark flags as optional and mutually exclusive. From Tiago Cunha. 2013-10-10 12:02:55 +00:00
cmd.c Remove the choose-list command to prepare for some later choose-* work. 2014-04-16 21:02:41 +00:00
colour.c Remove tmux's (already minimal) 88 colour support. Such terminals are 2013-03-27 11:17:12 +00:00
control-notify.c Differentiate between linked and unlinked window closes and renames, 2014-04-23 10:14:29 +00:00
control.c Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can 2013-10-10 11:45:28 +00:00
environ.c Some more long lines. 2014-04-17 14:45:49 +00:00
format.c Add some UTF-8 utility functions and use them to prevent the width limit 2014-04-17 15:37:55 +00:00
grid-cell.c Rather than having two grids for each pane, one for ASCII and one for 2013-01-18 02:16:21 +00:00
grid-view.c Some more long lines. 2014-04-17 14:45:49 +00:00
grid.c Memory leak in error path and unnecessary assignment, from clang. 2014-04-16 23:05:38 +00:00
input-keys.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
input.c Don't limit the DCS buffer to 256 bytes, expand it as needed. Requested 2014-04-17 12:43:38 +00:00
job.c Don't leak socketpair file descriptors if fork fails. Spotted by Balazs 2014-04-14 22:27:30 +00:00
key-bindings.c Remove the "info" message mechanism, this was only used for about five 2014-04-17 07:55:43 +00:00
key-string.c In terminals with XT, turn on modifyOtherKeys=1 with the escape sequence 2013-03-22 10:30:04 +00:00
layout-custom.c Fix handling of short (< 4 character) checksums and a bug with parsing 2013-03-25 11:35:30 +00:00
layout-set.c Some more long lines. 2014-04-17 14:45:49 +00:00
layout.c Both the two previous ways of navigating panes by direction have 2014-05-08 06:03:30 +00:00
log.c Remove log_debug2 as well and simplify log.c. 2014-03-31 21:42:45 +00:00
Makefile Remove the choose-list command to prepare for some later choose-* work. 2014-04-16 21:02:41 +00:00
mode-key.c Add setb -a to append and a copy mode append command, from J Raynor with 2014-03-31 21:39:31 +00:00
names.c Add automatic-rename-format option allowing automatic rename to use 2013-10-10 11:56:50 +00:00
notify.c Add notification for input from a pane, from George Nachman. 2012-09-25 07:41:22 +00:00
options-table.c Wrap some long lines. 2014-04-17 12:57:28 +00:00
options.c Allow replacing each of the many sets of separate foo-{fg,bg,attr} 2014-01-28 23:07:09 +00:00
paste.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
procname.c Memory leak in error path and unnecessary assignment, from clang. 2014-04-16 23:05:38 +00:00
resize.c Make session_attached a count and add session_many_attached flag. 2014-03-31 21:37:55 +00:00
screen-redraw.c Having three *clock* files is ridiculous, remove clock.c. 2014-03-31 21:34:08 +00:00
screen-write.c Some more long lines. 2014-04-17 14:45:49 +00:00
screen.c Three small changes from Tiago Cunha: 2014-01-09 14:05:55 +00:00
server-client.c Because we pass the file descriptor from client to server, tmux can't 2014-04-16 08:02:31 +00:00
server-fn.c Some more long lines. 2014-04-17 14:45:49 +00:00
server-window.c Remove the monitor-content option and associated bits and bobs. It's 2014-04-17 07:36:45 +00:00
server.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
session.c Set PATH explicitly, either from client or session 2014-04-17 13:02:59 +00:00
signal.c Do not call event_del() for signals after fork(), just use sigaction() 2010-08-19 18:29:01 +00:00
status.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
style.c Handle colour 8 properly in the 256 colour palette, from Timothy Allen. 2014-05-08 05:53:29 +00:00
tmux.1 #nnT went away a while ago, remove a leftover from the manpage. 2014-04-17 15:48:02 +00:00
tmux.c Remove the "info" message mechanism, this was only used for about five 2014-04-17 07:55:43 +00:00
tmux.h Both the two previous ways of navigating panes by direction have 2014-05-08 06:03:30 +00:00
tty-acs.c Add comments to ACS table matching terminfo(5). 2013-11-24 19:38:32 +00:00
tty-keys.c Work out mouse scroll wheel effect when the mouse is first detected and 2014-04-03 08:20:29 +00:00
tty-term.c Wrap some long lines. 2014-04-17 12:57:28 +00:00
tty.c specifying ECHOCTL once is enough 2014-04-25 12:45:16 +00:00
utf8.c Add some UTF-8 utility functions and use them to prevent the width limit 2014-04-17 15:37:55 +00:00
window-choose.c Only scroll by one line at a time in choose mode, lists are generally 2014-04-17 14:13:59 +00:00
window-clock.c Having three *clock* files is ridiculous, remove clock.c. 2014-03-31 21:34:08 +00:00
window-copy.c There is no longer a need for a paste_stack struct or for global_buffers 2014-04-24 09:14:43 +00:00
window.c Both the two previous ways of navigating panes by direction have 2014-05-08 06:03:30 +00:00
xmalloc.c xfree is not particularly helpful, remove it. From Thomas Adam. 2012-07-10 11:53:01 +00:00
xterm-keys.c The last fix to xterm keys meant that some keys such as \033OA were 2014-02-10 11:20:41 +00:00