-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ViM mousing only partially works, works different across different platforms #10321
Comments
I'm surprised at a bunch of these, actually. This is my understanding of how it should work, given some constraints: EXPECTED
I'll work on figuring out what's actually going on here... Are you using ssh from within WSL or from Windows (ssh.exe)? |
I can confirm that with 8.2 patches 1-2932 I can only see selection & click works, but not scrolling. Link to patch 2913 vim/vim@6ef5ab5 |
@DHowett The ssh I'm using is from git @ Also, I am not sure what happened with my test before using cmd, (Number 6) but it does behave the same as Number 2. Meaning, Selection & Clicking work, but not Scrolling. I updated my initial table to reflect the changes. |
ALRIGHT! I think I've cracked it. Here's my updated table...
Notes
|
On Win10, having a similar issue where mouse scroll up works but mouse scroll down does not. Using putty to ssh to a Linux 2 server to edit with vim 8.1 (included patches 1-1602). Same putty client with vim 8.0 (patches 1-503, 1365) does not have this issue. |
I want to ask, should scrolling work for pure vim on windows in windows terminal? For me, it does not. WinTerm - 1.11.2421 It only works if I ssh to my Gentoo virtual machine and run vim there (from the WinTerm or from the cmd terminal) and it also works when I start vim from MSYS2 mingw64. Left-click works for me in all the above-described environments. I have tried different settings, |
Now I have tried neovim and scrolling is working like expected, it looks like a bug in the vim itself. |
I use Neovim over an ssh connection to a linux machine, scrolling and clicking are not work. |
@DHowett hi, what do you mean by "Patch 2913 is required"? |
If you are using Vim 8.1 or 8.2, you need to have a patch version greater than or equal to 2913. |
neovim/neovim#14328 |
I am not sure about the mapping of neovim versions to vim versions. My advice applies only vim. The neovim maintainers will need to accept a similar patch. |
I use neovim over SSH in https://github.com/Eugeny/tabby, mouse actions work fine. So I think it's not neovim's issue. |
Please file a separate issue! This one is specific to traditional vim :) |
This is caused by the Vim compiled for windows consoles, the source code does not have mouse scroll handling in windows consoles. I had a go, and it was simple to add it, so I have just developed a pull request for vim. vim/vim#11374 |
watching with rapt attention! Thanks for doing this! |
Can help me by testing the new windows console mouse scroll event handling now in Vim 9, from at least Patch 9.0.0812. I did a few submissions and patches, I've only been manually testing it myself so far. Feedback is very welcome. |
Omg, many thx @zewpo, we can finally scroll in vim on Windows 🙌🤙, I had tried to create a similar patch like this, and I created a scrolling handler in But your PR works perfectly and I'm so grateful for this 🙏I have installed |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I have the same issue as @BDisp but specifically in ViM. I'm using Microsoft Terminal with WSL2 (ArchLinux) and ViM 9.0. Text selection/interaction and scrolling is only working on the left half of the terminal (in my case, it seems to work for the first 95 characters). This issue is only present inside of ViM - when at the prompt, I can select text and scroll regardless of where the cursor/mouse is. @DHowett You mentioned "SGR" reporting in your comment - I noticed that ViM lists this in the included features when using
Is there any way I can test if this mode is being requested and used properly by ViM? |
Honestly, I'm not sure how to tell whether it's using it properly... but I think that we can figure out whether it's requesting it with Whether it does that automatically is probably based on a number of things like |
Aha! ViM isn't requesting it:
Forcing it using |
Windows Terminal version (or Windows build number)
1.9.1445.0
Other Software
This is the newest ViM from the vim for windows github
Steps to reproduce
Install WT (Windows Terminal), ViM, Git, WSL for testing (see combinations tested below)
Create
vimrc-test
file with the contents:set mouse=a
Run command with
vim -u vimrc-test textfile
wheretextfile
is some file that is long enough to have room to scroll.Expected Behavior
Clicking, Selecting, Scrolling to work across all Windows Terminal combinations (except for
cmd.exe
, I don't expect that)Actual Behavior
Is scrolling supposed to work at this point? I've tested a number of options, and my findings are currently:
#
WT + PowerShell + Windows ViM✔✔❌By remote ViM I mean using ViM over an ssh connection to a linux machine.
Referencing #376
The text was updated successfully, but these errors were encountered: