patches for Smooth scrolling (in rxvt)

how to keep reading while scrolling

This page contains patches to make scrolling inside rxvt comparable with smooth-scrolling in firefox. WARNING: it is not very usable with LCD screens. Read why in this excellent article by Dave Marsh, about eyes & monitors.

Table of Contents



I find it useful to use text-only elinks web browser instead of firefox. (I use it for html documentations, and wsws, where I usually don't expect images).

But web pages are more than 1 page, and i need to scroll. Firefox has a nice smooth scrolling (now smooth-wheel) , and I think, that given a good keyboard control, with smooth scrolling it is possible to read while scrolling. Text scrolling by line-height skips is disturbing; while ending titles in films are readable!



While hacking on rxvt (to remove flickering I got a diabolic idea: scroll by pixels, rather than by text lines. Simple to state, but it needed some preparation.

I knew the "difference" algorithm (pdf), but this needed a different one: heckel algorithm. I couldn't find free documentation, so I took some free implementation and read it till I understood, that "heckel" algo is about heuristics, it does not solve e well defined problem. It is used in ncurses,

I want this algo to find out a "scroll similarity" between 2 sequences of text.

But first a bit of background:

Formulation of the problem:


Historical curiosity:

When I feed the Xserver with the sequence of XCopyArea calls, it is not fast as I would have wished for.... by which I mean I didn't have to interleave them with some pauses. The speed is just fine on my matrox G450 @ 1920x1440 (bandwidth 2.7GB/sec) & amd 1700 xp. That's just a lucky combinationn in my case.


as is the tradition on #rxvt-unicode I didn't get any positive feedback: see irc log


(you can get gentoo ebuilds here: rxvt and elinks)

How to build:

untar, and run

# Possibly add      --prefix=/usr  ?

./configure --enable-everything --enable-rxvt-scroll --enable-next-scroll --enable-xterm-scroll
--enable-transparency --enable-xpm-background --enable-utmp --enable-wtmp --enable-mousewheel
--enable-slipwheeling --enable-smart-resize --enable-256-color --enable-menubar --enable-xim
--enable-shared --enable-keepscrolling --with-term="rxvt"

make install          (as root)
--enable-html-highlight --with-gpm --with-zlib --with-bzlib --with-openssl --with-x --with-nls --with-ftp (as you like, there is no option needed for the scrolling feature) make && make install


Fine-scrolling is invoked only when the scroll step is less than 10 lines (up- or down-wards). I suggest setting they key-repeat low enough, so that you can just keep the key down and see the page flow. I use

xset r rate 190 10 
for the elinks window, while 190 40 for others. I have that tuning done automatically by my Sawfish (window manager)


Demo for Sawfish users:

I changed a bit the slide-window function to use microsteps.

but there has been a similar code in another sawfish extension!

Page started 8/1/2006