From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: Emacs GTK scroll-bar flickering Date: Tue, 18 Mar 2003 15:42:27 -0700 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3E77A0D3.4010509@ihs.com> References: <200303182319.h2INJ0bP024745@stubby.bodenonline.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1048027594 11027 80.91.224.249 (18 Mar 2003 22:46:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2003 22:46:34 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 18 23:46:33 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18vPqr-0002rc-00 for ; Tue, 18 Mar 2003 23:46:33 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18vPrK-00009K-00 for ; Tue, 18 Mar 2003 23:47:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vPo2-0006B3-03 for emacs-devel@quimby.gnus.org; Tue, 18 Mar 2003 17:43:38 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18vPnf-00066P-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 17:43:15 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18vPnb-0005yL-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 17:43:14 -0500 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18vPna-0005sf-00 for emacs-devel@gnu.org; Tue, 18 Mar 2003 17:43:11 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18vPnW-0002bG-00 for ; Tue, 18 Mar 2003 23:43:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18vPmn-0002Xb-00 for ; Tue, 18 Mar 2003 23:42:21 +0100 Original-Lines: 32 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12450 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12450 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. -- Kevin Rodgers