当我尝试在tmux中使用类似vim的页面向上/向下翻页(ctrl-u,ctrl-d)时,我有一些奇怪的滚动行为多个窗格。在下面的示例图片中,我有两个垂直分割的窗格,我正在尝试向右翻页(ctrl-a- [,ctrl-u)。
上页前:
翻页后:
有一些奇怪的重绘问题正在发生,它正在破坏两个窗格。一个奇怪的事情是我可以逐行向上滚动(ctrl-a- [,向上箭头,...)就好了,它似乎正确地重绘。
当我有一个垂直拆分的vim会话(例如,使用NERDTree)并且我尝试在右窗格中向上/向下翻页时,会发生类似的问题。
我正在使用:OSX中的终端应用程序,Yosemite 10.10.3,tmux 2.0(通过自制程序安装)。使用tmux 1.9a也会发生这种情况。
我的.tmux.conf如下所示,但请注意,此问题存在于完全空白的.tmux.conf文件中。
.tmux.conf:
#set -g utf8 on
#set-window-option -g utf8 on
# I like C-b, but I use it in vim for ctrl-p's buffer mode
# and C-a interferes with emacs, so I'll try C-q
unbind C-b
set -g prefix C-a
# Move between panes
bind-key -r "." next-window
bind-key -r "," previous-window
# NOTE: these require tmux 1.9 or later
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Highlight active window
set-window-option -g window-status-current-bg red
# Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
set-window-option -g automatic-rename on
# resize panes like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r < resize-pane -L 3
bind -r > resize-pane -R 3
bind -r + resize-pane -U 1
bind -r - resize-pane -D 1
set -g default-terminal 'screen-256color'
# display visible indicator of each pane
bind-key w display-panes
# swap panes
bind-key -r J swap-pane -D
bind-key -r K swap-pane -U
# enable mouse selection in copy mode
# setw -g mode-mouse on
set-option -g mouse-select-window on
set -g mouse-select-pane on
set-option -g mouse-resize-pane on
# set-option -g mouse-utf8 on
# use vi-style key bindings in the status line
set -g status-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind-key -t vi-edit Up history-up
bind-key -t vi-edit Down history-down
set -s escape-time 0