rheostat2718 / conemu-maximus5

Automatically exported from code.google.com/p/conemu-maximus5
7 stars 1 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

Original issue reported on code.google.com by robmckni...@gmail.com on 26 Nov 2014 at 12:01

GoogleCodeExporter commented 8 years ago
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.

Original comment by ConEmu.Maximus5 on 26 Nov 2014 at 12:21

GoogleCodeExporter commented 8 years ago
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.

Original comment by robmckni...@gmail.com on 26 Nov 2014 at 12:33