Skip to content
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 Official doesn't scroll with scroll wheel when :set mouse=a #1822

Open
Maximus5 opened this issue Jul 31, 2015 · 2 comments
Open

Vim Official doesn't scroll with scroll wheel when :set mouse=a #1822

Maximus5 opened this issue Jul 31, 2015 · 2 comments

Comments

@Maximus5
Copy link
Owner

Originally reported on Google Code with ID 1823

OS version: Win8.1 x64
ConEmu version:  141125
Vim: Official 7.4 for Windows

*Bug description*
When Vim is running in a conemu console with :set mouse=a the scroll wheel does not
scroll vim's text buffer.

Expected behavior is that vim would scroll it's text buffer up and down when the mouse
wheel scrolls up and down.

Other mouse=a features behave correctly (click to move caret, drag to use visual mode)

BufferHeight mode in conemu is off
Alternative mode in conemu is off

This might be a Vim bug or a Vim settings issue but the identical vim configuration
in Linux does scroll the buffer as expected.

Vim doesn't seem to be receiving the scroll wheel events or is not interpreting them
properly. It can be configured to expect ANSI codes from the scroll wheel ( "[64~"
and "[65~" ).

Is there a way to have conemu send those ANSI codes when the scroll wheel is used perhaps?

*Steps to reproduction*
1. Install vim 7.4 for windows from vim.org
2. Run vim.exe (not gvim) in a conemu terminal (either directly or through cmd or powershell)
3. :set mouse=a
4. Use scroll wheel on mouse to scroll vim's text buffer

Reported by robmcknight1 on 2014-11-26 12:01:57

@Maximus5
Copy link
Owner Author

I do not see either in standard nor in vim sources codes like "\e[64~".
Of course you may try to send them via GuiMacro like:
Print("\e[64~")
However they are not working in my tests.
Without digging sources and debugging vim I can't say more.
Also. Windows version of vim process mouse internally, ConEmu do not translate mouse
clicks into ANSI. you may check that revealing RealConsole and click/drag/wheel there.
And seems like vim just do not implement scrolling with mouse.
May be it's better to ask vim developers in their group.

Reported by ConEmu.Maximus5 on 2014-11-26 12:21:03

@Maximus5
Copy link
Owner Author

Wow thanks for the quick response! Very impressive.

I got the ansi idea from the vim documentation where it's talking about a solution
for older xterm terminals. 

Looking closer at it I now see that what they were suggesting is to map those codes
to the wheel in the xterm configuration and then map them to the S-MouseUp and S-MouseDown
mappings in vim. Initially I just thought those were real codes sent by default in
some ancient version of xterm.

see here:
http://wwwcdf.pd.infn.it/vim/scroll.html#xterm-mouse-wheel

I might try doing something like that with GuiMacro and telling vim to handle it with
map.

Reported by robmcknight1 on 2014-11-26 12:33:35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant