Miles Bader writes:
That's not the issue, I think -- with exactly the same file and theme,
I can drag the scrollbar around in Gedit with _no_ flickering or other
unpleasant artifacts, whereas emacs flickers like crazy in the same test.
It indeed is the issue. Where Gedit counts the lines in a file and
the lines shown, Emacs counts characters.
When calculating the size of the thumb, one basically divide lines shown
with total lines in file. When moving about and adding or
deleting characters that does not change the number of lines in the
file, the thumb size does not change.
When lines aren't available, Emacs uses characters instead. But
every character added or deleted changes the thumb because the ratio
between total number characters in the file and the number of characters
shown changes. Thus, Emacs updates the thumb a lot more than a
line based application. When the scroll bar is bad at updating
for small changes like this, flicker occurs.