ConEmu: Scroll wheel does not work in tmux in WSL
Versions
ConEmu build: 170402-Preview x64
OS version: Windows 10, build 15063 (Creators Update RTM) x64
Used shell version: WSL, invoked as a new task via *"%windir%\system32\bash.exe -cur_console:p"
tmux version: 2.1
WSL Ubuntu version: 16.04
Problem description
When attempting to scroll a buffer in a WSL tab running tmux, instead of scrolling, the error chime plays, and either ~2 or ~3 is printed to the input buffer (depending on the direction scrolled).
Steps to reproduce
- Start a new WSL ConEmu tab via
bash.exe -cur_console:p(or via the task listed above) - Open a tmux session.
- Generate enough output that vertical scrolling is required.
- Attempt to use the mouse’s scroll wheel.
Actual results
The Windows error chime plays, and the ~2 or ~3 is entered into the input buffer.
Expected results
The tmux buffer scrolls.
Interesting notes
Bizarrely, if I show the RealConsole, and attempt to scroll my tmux buffer in that window, it works just fine.
I can also confirm that scrolling works as expected in a plain old Powershell window that’s running WSL.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 21
- Comments: 25 (6 by maintainers)
I am using cmder (based on ConEmu), and I fix it by checking on the option “Send mouse events to console”: Win + Alt + P -> Keys & Macro -> Mouse Options, then check on “Send mouse events to console” option.
Apologies, there’s one extra reproduction step I forgot to mention:
3.5. In tmux, enable
mousemode withtmux set mouse.This will enable mousewheel scrolling.
@Maximus5 It seems that the culprit here is the
set -s escape-time 0in.tmux.conf!This
escape-timeis often set to 0 in tmux to avoid lagging with vim, but I guess here it didn’t let the mouse click time to “finish”… clicking? Putting it to 20 ms seems to do the job without making vim lag too much.@tfriedel @XA21X , would you be in the same situation here, with
escape-timemodified in your.tmux.conf?thanks, it’s basically working now. however quite often an event (scroll wheel or mouse click) is missed and instead some control characters appear in the console. like: [❤️;29;1m[<0;20;1M[❤️;30;1m
@Maximus5 I can confirm that there is still issues on 190217 with mouse & tmux. tmux v2.8,
set -g mouse onin.tmux.confI launched tmux on bash (
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --log D:/Eloi/Bugs --wsl -new_console:m:"" -C~ -t bash) and did all clicks on my mouse (if I remember correctly, left, right, middle, wheel down, wheel up).I’m working on improving pty interface. Until then ConEmu does what it can at most