From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "grischka" Newsgroups: gmane.emacs.devel Subject: Re: gtk scroll bar deficiency Date: Fri, 15 Jun 2007 13:41:22 +0200 Message-ID: <012f01c7af43$04d0a240$560690d4@j4f3n1> References: <002201c7ae61$5d13fc00$d10990d4@j4f3n1> <87lkemki35.fsf@ambire.localdomain> <00b701c7aea8$72403de0$4a42fe91@j4f3n1> <1088867D-4306-4391-B0D0-E9CF971AE82B@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181908138 21846 80.91.229.12 (15 Jun 2007 11:48:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2007 11:48:58 +0000 (UTC) Cc: emacs-devel@gnu.org To: "David Reitter" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 15 13:48:56 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HzAIS-0001Rx-LW for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2007 13:48:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzAIR-0007xC-Mj for ged-emacs-devel@m.gmane.org; Fri, 15 Jun 2007 07:48:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HzAIN-0007vG-Hr for emacs-devel@gnu.org; Fri, 15 Jun 2007 07:48:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HzAIM-0007uG-LF for emacs-devel@gnu.org; Fri, 15 Jun 2007 07:48:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HzAIM-0007u9-G6 for emacs-devel@gnu.org; Fri, 15 Jun 2007 07:48:50 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HzAIL-0000oy-DW for emacs-devel@gnu.org; Fri, 15 Jun 2007 07:48:50 -0400 Original-Received: (qmail invoked by alias); 15 Jun 2007 11:48:47 -0000 Original-Received: from dialin-212-144-006-086.pools.arcor-ip.net (EHLO j4f3n1) [212.144.6.86] by mail.gmx.net (mp052) with SMTP; 15 Jun 2007 13:48:47 +0200 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX18emxkrSgge40xAbHeRSlkKWfi89ip1rIMifK5X3z UnUB+f12UfPF63 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:72948 Archived-At: David Reitter wrote: > And similarly, keeping the editor at a constant size is pretty much > impossible when the total number of lines in a buffer is unknown. > That is, of course, very confusing to many users who consider > switching to Emacs from another editor. To them, the vertical scroll- > bar has to do with the vertical position in the buffer and the > vertical dimensions of the window and the buffer. Yes. It's a matter of feedback between hand and eye that you want mouse-movements to be consistent with the text-flow in the window. You can get over minor flaws, but it still feels incomfortable. > For the scroll-bar, a > reasonable estimate would do the job (count line lengths in various > randomly sampled portions of the buffer if the buffer is big): the > scroll-bar is a visual tool and not an exact science. The number of > characters on the last page(s) may need to be precisely determined, > though Basically, an estimation over the file and an accurate calculation on the last page. I think it should work. Jason Rumney wrote: > An reasonable estimate is what we have now. If the estimate is > wrong, then the results are one of: ...(several bugs) Well, it should not result in bugs. I'm rather shure you have just overlooked something. What you do and how you do it depends on what you want, in the first place: (1) keep the character-based scrolling as is, that means put up with the inconsistent behaviour with vertical dimension movements as David pointed out above. (2) switch to line-based scrolling, that means much better behaviour except in areas with images or diverging font-heights, but even then better than with (1) (3) switch to pixel-based scrolling, that means flawless behaviour, but it could be expensive. All of (1-3) should work buglessly but within the limitations of the approach of course. Both (1) and (2) might need bits of (3), i.e. to calculate the start of the last page. --- grischka