Tmux 不响应 OS X Yosemite Terminal 中的滚动

Lan*_*opp 5 mouse terminal scrolling tmux macos

最近,我更新到了 OS X Yosemite,很高兴地发现 Apple 在他们的终端应用程序中添加了鼠标支持。这在滚动浏览我的历史记录的标准终端窗口和类似 less 的应用程序中非常有效。但是,当我使用触控板启动 tmux 滚动时,会滚动浏览我的命令历史记录而不是终端输出。

这是我的.tmux.conf文件的样子:

# INTERFACE

# enable mouse support
set-window-option -g mode-mouse on

# set up the default command to ensure the window's name is empty if it's not already defined and
# to reattach the user namespace to the current shell
set-option -g default-command 'reattach-to-user-namespace -l $SHELL;'

# modify the split pane keyboard shortcuts
unbind %
unbind '"'
bind '"' split-window -h
bind = split-window -v

# rebind the c shortcut so it creates a window with an empty name
bind-key c new-window -n ''

# set the window title to be the current session's name
set -g set-titles on
set -g set-titles-string '#S'
set-window-option -g automatic-rename off

# STATUS BAR

# start counting the window panes at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1

# set up the default colors and font weights
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold

# set up the status left
set -g status-right ""
set -g status-left-length 32
set -g status-left '#[fg=colour235,bg=colour252,bold] #S '

# set up the window status
set -g window-status-format "#[fg=white,bg=colour234] #I: #W "
set -g window-status-current-format "#[fg=colour235,bg=colour39,noreverse,bold] #I: #W "
Run Code Online (Sandbox Code Playgroud)

在此先感谢您的帮助!

小智 2

我也在优胜美地,进入复制模式后我可以使用鼠标滚轮滚动历史记录。