On 2014-05-31 20:35 +0530, Jay Rajput wrote: > Problem Statement: Mouse up scrolling not working in vim through tmux > in st. Mouse down scrolling works fine.
Thou shall not report release events for mouse wheel events. I think neither tmux, neither vim handles these gracefully. For some reason the release events are interpreted as scroll down in vim-in-tmux. So scolling down actually scrolls down twice and scrolling up is interpreted as a scroll up followed by a scroll down. > EarlyInvestigation using google: Google shows a similar problem though > with putty > http://superuser.com/questions/706881/mouse-scrolling-in-vim-through-tmux-how-to-configure. Yes, and I see that there was a patch posted[1] for putty already. Tmux is even considering fixing[2] support for the broken terminals. I've also attached a sample way to fix this in st. Sidenote: while looking at tmux under st I experienced a lot of other rendering problems. I suspect this is because st's VT100 emulation is a bit weak. In case this is something the suckless community would like to fix, I recommend using xterm's vttest[3] to test the features. [1] https://github.com/atsepkov/putty-X/commit/bbced [2] http://sourceforge.net/p/tmux/tickets/128/ [3] http://invisible-island.net/vttest/vttest.html -- Balazs
>From 2cdd8ae4d5a76bdf735dec7f86bbfb41f3cd753d Mon Sep 17 00:00:00 2001 From: Balazs Kezes <rlblas...@gmail.com> Date: Sat, 31 May 2014 22:24:58 +0100 Subject: [PATCH] Don't report release events for mouse wheel --- st.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/st.c b/st.c index 506be0f..94fe725 100644 --- a/st.c +++ b/st.c @@ -829,6 +829,8 @@ mousereport(XEvent *e) { /* MODE_MOUSEX10: no button release reporting */ if(IS_SET(MODE_MOUSEX10)) return; + if (button == 64 || button == 65) + return; } } -- 1.9.1.423.g4596e3a