diff options
author | 2020-03-20 18:19:22 +0000 | |
---|---|---|
committer | 2020-03-20 18:19:22 +0000 | |
commit | 91d821e1818238d48dbc65e2db354d3377a0356c (patch) | |
tree | 7c78f01266de9bca8a4d9939607408cbc8973349 /usr.bin/tmux/key-bindings.c | |
parent | Still want the per-mode menus outside copy mode. (diff) | |
download | wireguard-openbsd-91d821e1818238d48dbc65e2db354d3377a0356c.tar.xz wireguard-openbsd-91d821e1818238d48dbc65e2db354d3377a0356c.zip |
Disable swap entries if nothing to swap with.
Diffstat (limited to 'usr.bin/tmux/key-bindings.c')
-rw-r--r-- | usr.bin/tmux/key-bindings.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tmux/key-bindings.c b/usr.bin/tmux/key-bindings.c index ef3879fd15e..6b11e423127 100644 --- a/usr.bin/tmux/key-bindings.c +++ b/usr.bin/tmux/key-bindings.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-bindings.c,v 1.111 2020/03/20 18:11:56 nicm Exp $ */ +/* $OpenBSD: key-bindings.c,v 1.112 2020/03/20 18:19:22 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -34,8 +34,8 @@ " 'New Session' 's' {new-session}" \ " 'New Window' 'w' {new-window}" #define DEFAULT_WINDOW_MENU \ - " 'Swap Left' 'l' {swap-window -t:-1}" \ - " 'Swap Right' 'r' {swap-window -t:+1}" \ + " '#{?#{>:#{session_windows},1},,-}Swap Left' 'l' {swap-window -t:-1}" \ + " '#{?#{>:#{session_windows},1},,-}Swap Right' 'r' {swap-window -t:+1}" \ " '#{?pane_marked_set,,-}Swap Marked' 's' {swap-window}" \ " ''" \ " 'Kill' 'X' {kill-window}" \ @@ -57,8 +57,8 @@ " 'Horizontal Split' 'h' {split-window -h}" \ " 'Vertical Split' 'v' {split-window -v}" \ " ''" \ - " 'Swap Up' 'u' {swap-pane -U}" \ - " 'Swap Down' 'd' {swap-pane -D}" \ + " '#{?#{>:#{window_panes},1},,-}Swap Up' 'u' {swap-pane -U}" \ + " '#{?#|>:#{window_panes},1},,-}Swap Down' 'd' {swap-pane -D}" \ " '#{?pane_marked_set,,-}Swap Marked' 's' {swap-pane}" \ " ''" \ " 'Kill' 'X' {kill-pane}" \ |