[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs GTK scroll-bar flickering

From: Kevin Rodgers
Subject: Re: Emacs GTK scroll-bar flickering
Date: Tue, 18 Mar 2003 15:42:27 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Jan D. wrote:

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.

What does that mean, "when lines aren't available"?

Since scrolling is about vertical display, the only thing that counts is the
number of lines of text (or the number of pixels, in case of variable height
fonts and/or images).  The number of characters is irrelevant.

<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]