[BACK]Return to key-bindings.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/key-bindings.c between version 1.96 and 1.97

version 1.96, 2019/05/28 09:50:54 version 1.97, 2019/05/28 10:05:24
Line 24 
Line 24 
   
 #include "tmux.h"  #include "tmux.h"
   
   #define DEFAULT_CLIENT_MENU \
           " 'Detach' 'd' {detach-client}" \
           " 'Detach & Kill' 'X' {detach-client -P}" \
           " 'Detach Others' 'o' {detach-client -a}" \
           " ''" \
           " 'Lock' 'l' {lock-client}"
   #define DEFAULT_SESSION_MENU \
           " 'Next' 'n' {switch-client -n}" \
           " 'Previous' 'p' {switch-client -p}" \
           " ''" \
           " 'Renumber' 'N' {move-window -r}" \
           " 'Rename' 'n' {command-prompt -I \"#S\" \"rename-session -- '%%'\"}" \
           " ''" \
           " '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}" \
           " '#{?pane_marked_set,,-}Swap Marked' 's' {swap-window}" \
           " ''" \
           " 'Kill' 'X' {kill-window}" \
           " 'Respawn' 'R' {respawn-window -k}" \
           " '#{?pane_marked,Unmark,Mark}' 'm' {select-pane -m}" \
           " 'Rename' 'n' {command-prompt -I \"#W\" \"rename-window -- '%%'\"}" \
           " ''" \
           " 'New After' 'w' {new-window -a}" \
           " 'New At End' 'W' {new-window}"
   #define DEFAULT_PANE_MENU \
           " '#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}' 'C-r' {copy-mode -t=; send -Xt= search-backward \"#{q:mouse_word}\"}" \
           " '#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}' 'C-y' {send-keys -l -- \"#{q:mouse_word}\"}" \
           " '#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}' 'c' {set-buffer -- \"#{q:mouse_word}\"}" \
           " '#{?mouse_line,Copy Line,}' 'l' {set-buffer -- \"#{q:mouse_line}\"}" \
           " ''" \
           " 'Horizontal Split' 'h' {split-window -h}" \
           " 'Vertical Split' 'v' {split-window -v}" \
           " ''" \
           " 'Swap Up' 'u' {swap-pane -U}" \
           " 'Swap Down' 'd' {swap-pane -D}" \
           " '#{?pane_marked_set,,-}Swap Marked' 's' {swap-pane}" \
           " ''" \
           " 'Kill' 'X' {kill-pane}" \
           " 'Respawn' 'R' {respawn-pane -k}" \
           " '#{?pane_marked,Unmark,Mark}' 'm' {select-pane -m}" \
           " '#{?window_zoomed_flag,Unzoom,Zoom}' 'z' {resize-pane -Z}"
   
   
 static int key_bindings_cmp(struct key_binding *, struct key_binding *);  static int key_bindings_cmp(struct key_binding *, struct key_binding *);
 RB_GENERATE_STATIC(key_bindings, key_binding, entry, key_bindings_cmp);  RB_GENERATE_STATIC(key_bindings, key_binding, entry, key_bindings_cmp);
 static int key_table_cmp(struct key_table *, struct key_table *);  static int key_table_cmp(struct key_table *, struct key_table *);
Line 281 
Line 327 
                 "bind -n MouseDown3Pane if -Ft= '#{||:mouse_any_flag,pane_in_mode}' 'select-pane -t=; send-keys -M' 'select-pane -mt='",                  "bind -n MouseDown3Pane if -Ft= '#{||:mouse_any_flag,pane_in_mode}' 'select-pane -t=; send-keys -M' 'select-pane -mt='",
                 "bind -n WheelUpPane if -Ft= '#{mouse_any_flag}' 'send-keys -M' 'if -Ft= \"#{pane_in_mode}\" \"send-keys -M\" \"copy-mode -et=\"'",                  "bind -n WheelUpPane if -Ft= '#{mouse_any_flag}' 'send-keys -M' 'if -Ft= \"#{pane_in_mode}\" \"send-keys -M\" \"copy-mode -et=\"'",
   
                 "bind -n MouseDown3StatusRight display-menu -t= -xM -yS -T \"#[align=centre]#{client_name}\""                  "bind -n MouseDown3StatusRight display-menu -t= -xM -yS -T \"#[align=centre]#{client_name}\" " DEFAULT_CLIENT_MENU,
                         " 'Detach' 'd' {detach-client}"                  "bind -n MouseDown3StatusLeft display-menu -t= -xM -yS -T \"#[align=centre]#{session_name}\" " DEFAULT_SESSION_MENU,
                         " 'Detach & Kill' 'X' {detach-client -P}"                  "bind -n MouseDown3Status display-menu -t= -xW -yS -T \"#[align=centre]#{window_index}:#{window_name}\" " DEFAULT_WINDOW_MENU,
                         " 'Detach Others' 'o' {detach-client -a}"                  "bind C-m display-menu -xW -yS -T \"#[align=centre]#{window_index}:#{window_name}\" " DEFAULT_WINDOW_MENU,
                         " ''"                  "bind -n M-MouseDown3Pane display-menu -t= -xM -yM -T \"#[align=centre]#{pane_index} (#{pane_id})\" " DEFAULT_PANE_MENU,
                         " 'Lock' 'l' {lock-client}",                  "bind M-m display-menu -xP -yP -T \"#[align=centre]#{pane_index} (#{pane_id})\" " DEFAULT_PANE_MENU,
                 "bind -n MouseDown3StatusLeft display-menu -t= -xM -yS -T \"#[align=centre]#{session_name}\""  
                         " 'Next' 'n' {switch-client -n}"  
                         " 'Previous' 'p' {switch-client -p}"  
                         " ''"  
                         " 'Renumber' 'N' {move-window -r}"  
                         " 'Rename' 'n' {command-prompt -I \"#S\" \"rename-session -- '%%'\"}"  
                         " ''"  
                         " 'New Session' 's' {new-session}"  
                         " 'New Window' 'w' {new-window}",  
                 "bind -n MouseDown3Status display-menu -t= -xW -yS -T \"#[align=centre]#{window_index}:#{window_name}\""  
                         " 'Swap Left' 'l' {swap-window -t:-1}"  
                         " 'Swap Right' 'r' {swap-window -t:+1}"  
                         " '#{?pane_marked_set,,-}Swap Marked' 's' {swap-window}"  
                         " ''"  
                         " 'Kill' 'X' {kill-window}"  
                         " 'Respawn' 'R' {respawn-window -k}"  
                         " '#{?pane_marked,Unmark,Mark}' 'm' {select-pane -m}"  
                         " 'Rename' 'n' {command-prompt -I \"#W\" \"rename-window -- '%%'\"}"  
                         " ''"  
                         " 'New After' 'w' {new-window -a}"  
                         " 'New At End' 'W' {new-window}",  
                 "bind -n M-MouseDown3Pane display-menu -t= -xM -yM -T \"#[align=centre]#{pane_index} (#{pane_id})\""  
                         " '#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}' 'C-r' {copy-mode -t=; send -Xt= search-backward \"#{q:mouse_word}\"}"  
                         " '#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}' 'C-y' {send-keys -l -- \"#{q:mouse_word}\"}"  
                         " '#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}' 'c' {set-buffer -- \"#{q:mouse_word}\"}"  
                         " '#{?mouse_line,Copy Line,}' 'l' {set-buffer -- \"#{q:mouse_line}\"}"  
                         " ''"  
                         " 'Horizontal Split' 'h' {split-window -h}"  
                         " 'Vertical Split' 'v' {split-window -v}"  
                         " ''"  
                         " 'Swap Up' 'u' {swap-pane -U}"  
                         " 'Swap Down' 'd' {swap-pane -D}"  
                         " '#{?pane_marked_set,,-}Swap Marked' 's' {swap-pane}"  
                         " ''"  
                         " 'Kill' 'X' {kill-pane}"  
                         " 'Respawn' 'R' {respawn-pane -k}"  
                         " '#{?pane_marked,Unmark,Mark}' 'm' {select-pane -m}"  
                         " '#{?window_zoomed_flag,Unzoom,Zoom}' 'z' {resize-pane -Z}",  
   
                 "bind -Tcopy-mode C-Space send -X begin-selection",                  "bind -Tcopy-mode C-Space send -X begin-selection",
                 "bind -Tcopy-mode C-a send -X start-of-line",                  "bind -Tcopy-mode C-a send -X start-of-line",

Legend:
Removed from v.1.96  
changed lines
  Added in v.1.97