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
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).
bash.exe -cur_console:p (or via the task listed above)The Windows error chime plays, and the ~2 or ~3 is entered into the input buffer.
The tmux buffer scrolls.
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.
Apologies, there's one extra reproduction step I forgot to mention:
3.5. In tmux, enable mouse mode with tmux set mouse.
This will enable mousewheel scrolling.
Mouse mode indeed does not work for me either. Turning off mouse mode does not help. This behavior is more clear when you split horizontally in Tmux and attempt to scroll the top or bottom pane.
I have tried various mouse configurations, including on the tmux side to no avail.
https://github.com/NHDaly/tmux-better-mouse-mode
I wonder what is the best way to debug the character escape sequences of a terminal emulator? In any case, onward.
I have similar issue with ConEmu 170807, which is running Cygwin ssh via conenu-cyg-32.exe, which is running tmux v2.3, which is running mc v4.8.18. In this combination mouse does not work in mc. If started without tmux, mc works fine. Scrolling also works fine in tmux. Seems like to be a tmux or mc issue (vim works fine under tmux), but I wonder if somebody can advise how to debug the issue. I don't have WSL installed, the command-line is conemu-cyg-32.exe ssh user@host.
I have the same issue using ConEmu with WSL and then attempting to use the mouse with vim (mouse=a). Works fine with regular cmd or powershell.
How do you run WSL?
this is a dealbreaker for me. I'm running WSL with c:\Users\thomas\AppData\Local\Microsoft\WindowsApps\ubuntu.exe -cur_console:p -c fish
How many times I shall explain that using of connector is essential?
ConEmu64.exe -basic -run {bash}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:
[<3;29;1m[<0;20;1M[<3;30;1m
I'm working on improving pty interface. Until then ConEmu does what it can at most
I'm having the same issue as @tfriedel, where mouse support mostly works but occasionally (sometimes very frequently) sending unrecognised escape codes instead. For me, it only happens in tmux at the prompt with mouse mode turned on, but somehow, neovim within tmux doesn't have this problem - maybe vim filters out unrecognised escape codes whereas tmux prints/types them?
I'm using Debian with fish shell (set via chsh) in WSL launched with the following command:
set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -C~ -cur_console:pm:/mnt --distro-guid={b281fda1-fa8a-49c7-a85f-dd2cc85bec24}
How many times I shall explain that using of connector is essential?
- Read BashOnWindows in ConEmu
- Download and install latest ConEmu build (180628 at the moment)
- Run
ConEmu64.exe -basic -run {bash}
@Maximus5 - You mean 180626? Can't find 180628.
Hey, I using the version 180626, and start wsl with the task:
set "PATH=%ConEmuBaseDirShort%\wsl" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -C~ -cur_console:pm:/mnt
The mouse scroll working well in the beginning, but when I enter the tmux, it not works anymore(util I exit the tmux) . I'm sure I've set correctly in tmux, as it works well when I run it in the ubuntu.exe
I have read BashOnWindows in ConEmu and real search the resolution hardly :(
Please forgive my poor English, thanks!
@Maximus5 I can confirm that there is still issues on 190217 with mouse & tmux.
tmux v2.8, set -g mouse on in .tmux.conf
I 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 can confirm that this is still present on 190303. If it can help make a diagnostic, I think that the "mouse characters" begin to show when mouse clicks are not useful anymore.
For example, using two panes with tmux and mouse mode enabled, the first click in another pane changes the active pane as it should and nothing is displayed; but as soon as no real action is intended (extra or "unsupported" click), the characters appear.
Same with the wheel: if you wheel up and there is things to display, everything seems to go well, but if you just start a tmux session and try to wheel down, characters appear. If you went up and down, just the "extra wheel movements" are displayed.
Still can't reproduce the issue.
It may be some extra configuration of tmux on your side.
So the questions:
{bash} task? E.g. ConEmu64.exe -run {bash}.cat ~/.tmux.conf?tmux -V? How have you installed it?set | grep TERM?Hi @Maximus5
I am using most of the time zsh on WSL Debian Testing and a custom zsh task.
For the sake of debugging, I changed it to:
{bash} task (set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt)tmux 2.8 with mouse enabled. .tmux.conf hereafter (I deleted classical prefix remap and disabled all my plugins for debugging):set -s escape-time 0
set -g base-index 1
set -g history-limit 50000
set -g display-time 4000
set -g focus-events on
set -g mouse on
TERM=xterm-256color in bash; TERM=screen in tmuxEdit : I just figured out that the things that are written depend of the position of the mouse on the term!
So without moving the mouse at all:
3;52;16m or 0;52;16M, 52 & 16 corresponding probably to the cursor position (column and line);2;**;**M but also sometimes 3;**;**m (which seems weird for the latter, maybe it's due to the copy/paste mechanisms that triggers some events with right and left buttons?);1;**;**M but also sometimes 3;**;**m (copy/paste again?);65;**;**M; mouse wheel up 64;**;**M (note that when there is something to wheel up to, it starts displaying only when the action can't be done... Like if the signal is transmitted normally but once there is nowhere to go, mouse codes are starting to be displayed);35;**;**m with other buttons...I have absolutely no idea if it can matters, but on the Info panel:
xterm|cygwin;xterm|AppKeys|BrPaste|cygwin|mouse=x54. Is the mouse=x54 normal?Edit: Could this be related to our issue? https://superuser.com/questions/417027/why-are-random-characters-inserted-into-my-tmux-session . The problem there seemed to be that the terminal didn't support "utf-8 mouse" (whatever that means)
@Maximus5 It seems that the culprit here is the set -s escape-time 0 in .tmux.conf!
escape-time time
Set the time in milliseconds for which tmux waits after an escape is input to determine if it is part of a function or meta key sequences. The default is 500 milliseconds.
This escape-time is 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-time modified in your .tmux.conf?
ConEmu+connector do their best to push escape sequences in the input queue atomicly. But it's a byte stream, delays may come somehow
Is the
mouse=x54normal?
JFI, it's a mouse mode requested by console. Expected if requested ;)
OK, thanks for the info. As far as I'm concerned, the issue is fixed; but maybe @tfriedel, @XA21X or @pingzing could confirm if the issue was the same for them?
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.
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.
This worked for me, thanks. I Had to update ConEmu manually within Cmder to make it work.
For the reference I use Cmder 1.3.12 and updated ConEmu to 190526.
+1 I can confirm I already had the option enabled but I had to update ConEmu to Preview channel for it work!
Most helpful comment
@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?