[patch] Scrolling/mouse wheel improvements

jjacky i.am.jack.mail at gmail.com
Thu Dec 22 16:49:00 CET 2011


Hi,

Just a little patch I figured I might share here.

One thing that always annoyed me with in urxvt was how, when running 
apps on secondary screen, one could not use the mouse wheel to scroll 
within said app, e.g. man or less (something possible in VTE-based 
terminals).

So here's a patch to change that. What it does is pretty simple: when 
using the mouse wheel, if you’re on secondary screen then no scrolling 
will occur, and instead some (3, to be exact) “fake” keystrokes will be 
sent to the running application. So, a wheel up will have the same 
result as pressing the Up key three times, and wheel down will do the 
same as pressing 3 times the Down key.

This is added as a new (disabled by default) option: secondaryWheel (ssw)


I'm also including a patch from rlblaster, posted in the Arch Linux 
forums (https://bbs.archlinux.org/viewtopic.php?id=129302), because I 
like it a lot as well (and I believe it wasn't shared here).

When resetting the terminal (Ctrl+L), by default urxvt simply moves the 
cursor on top of the window, and clears everything that was there. 
Meaning that as a result, it can cut off some of your buffer, as those 
lines are just cleared.

To fix this, rlblaster's patch will make it, before hand, add lines, 
thus allowing to keep your full scrolling buffer intact.

It looks the same, except that when scrolling up everything is there, 
nothing was cut.


There you go; Both patches are for rxvt-unicode-9.14

Hopefully this might be useful to some,
-jacky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clear.patch
Type: text/x-patch
Size: 901 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/rxvt-unicode/attachments/20111222/2fff24fb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: secondaryWheel.patch
Type: text/x-patch
Size: 4660 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/rxvt-unicode/attachments/20111222/2fff24fb/attachment-0001.bin>


More information about the rxvt-unicode mailing list