1

I'm experiencing an issue across multiple platforms where scrolling down with the mouse wheel works fine, but not scrolling up, while using vim within a tmux session within PuTTY. Any ideas? Maybe something in putty to sort out (Specifically, I'm using PuTTYTray, but this seems to happen in vanilla putty too)

My ~/.vimrc mouse setting:

set mouse=a

And my ~/.tmux.conf

set -g default-terminal "screen-256color"
set -g history-limit 300000
set -g prefix C-a
bind-key C-a last-window
bind-key C-a last-window
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind D source-file ~/.tmux/logs
set -g base-index 1
set -s escape-time 0
setw -g aggressive-resize on
#set -g terminal-overrides "xterm*:XT:smcup@:rmcup@:kUP5=\eOA:kDN5=\eOB:kLFT5=\eOD:kRIT5=\eOC"
setw -g mode-mouse on
4
  • Focus on the future. Don't look back. ;-) Mar 8, 2014 at 23:07
  • 1
    I prefer the old buddhist adage to not look to the past in regret, or to the future in anticipation, but around in awareness.
    – Dmitri DB
    Mar 8, 2014 at 23:25
  • Then use ctrl+d/ctrl+u and ctrl+f/ctrl+b.
    – romainl
    Mar 9, 2014 at 9:28
  • 1
    I too face the same issue but only with putty tray and not putty 0.62 The problem exists even when I remove every configuration from my .tmux.conf except set -g mode-mouse on
    – thequark
    Apr 14, 2014 at 8:31

2 Answers 2

3

For anyone that ends up here: this has been fixed in the 0.64 pre-release, which you can download from the official PuTTY website.

0

There seem to be a few different questions floating around on this topic. Please see my answer to a similar question for some insight into the issue itself. There is a potential solution provided as well as some analysis.

Mouse scrolling in vim through tmux, how to configure?


An excerpt of the link above describing the potential solution:

Potential Solution -- PuTTY

There appears to be an issue where PuTTY sends an extraneous ScrollDown event with every ScrollDown/ScrollUp event. This means that each attempt to scroll up gets cancelled out and nothing happens. Conversely, when scrolling down, each scroll event is doubled. The behavior is easy to validate by looking at the vim scrolling behavior first outside of tmux (where scrolling works properly), and second inside of tmux (where scrolling up does not work, and a single attempt to scroll down scrolls twice as much).

According to the following gmane thread, the issue described above is resolved with a patch from Putty-X (https://github.com/atsepkov/putty-X/commit/bbcedf5a85ca1ccaa27005e7f7ebeb4c8a783b88):

Link to gmane thread: http://comments.gmane.org/gmane.comp.terminal-emulators.tmux.user/5498.

NOTE: I haven't validated the above solution myself, so please review the gmane thread for additional information.

2
  • This is basically a link-only answer, which is not the preferred answer format for superuser. Can you summarize the steps here? Leaving the link is okay.
    – Heptite
    Apr 24, 2014 at 20:25
  • I'll take the patch mentioned here as a step, although I still see this as an issue with PuTTYTray as per the answer from @thequark. Might be able to sort out an additional patch for that if code is comparable, but it'll be in a few days or so as I'm not at my windows workstation until then.
    – Dmitri DB
    Apr 24, 2014 at 23:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .