Skip to content

Commit

Permalink
Fixed tmux mouse config for version 2.1
Browse files Browse the repository at this point in the history
tmux 2.1 broke the default mouse scrolling functionality. This mostly
fixes it. Also adds fast scrolling (half-page) with CTRL+wheel.

See tmux/tmux#145.
  • Loading branch information
eclubb committed Mar 17, 2016
1 parent 0316ce9 commit ec12534
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tmux.conf
Expand Up @@ -70,7 +70,9 @@ setw -g window-status-current-fg brightgreen
setw -g window-status-current-bg blue

# Mouse support.
setw -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
setw -g mouse on
bind -n WheelUpPane if-shell -Ft = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M

bind -t vi-copy WheelUpPane halfpage-up
bind -t vi-copy WheelDownPane halfpage-down

0 comments on commit ec12534

Please sign in to comment.