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: Scrollbar thumbs Date: Tue, 3 Nov 2009 01:48:49 +0100 Message-ID: <03A2EC54153A4BB1AAE5AF2D2E2B7264@editkapc> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1257209379 4981 80.91.229.12 (3 Nov 2009 00:49:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Nov 2009 00:49:39 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: "Miles Bader" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 03 01:49:33 2009 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 1N57aV-0000vm-Mn for ged-emacs-devel@m.gmane.org; Tue, 03 Nov 2009 01:49:32 +0100 Original-Received: from localhost ([127.0.0.1]:35610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N57aV-0004hZ-0I for ged-emacs-devel@m.gmane.org; Mon, 02 Nov 2009 19:49:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N57aO-0004hM-Sl for emacs-devel@gnu.org; Mon, 02 Nov 2009 19:49:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N57aI-0004el-Qp for emacs-devel@gnu.org; Mon, 02 Nov 2009 19:49:23 -0500 Original-Received: from [199.232.76.173] (port=40173 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N57aI-0004ee-JA for emacs-devel@gnu.org; Mon, 02 Nov 2009 19:49:18 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]:46393) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N57aH-0004D3-Rz for emacs-devel@gnu.org; Mon, 02 Nov 2009 19:49:18 -0500 Original-Received: (qmail invoked by alias); 03 Nov 2009 00:49:15 -0000 Original-Received: from p5B0C66F1.dip.t-dialin.net (EHLO editkapc) [91.12.102.241] by mail.gmx.net (mp020) with SMTP; 03 Nov 2009 01:49:15 +0100 X-Authenticated: #18588216 X-Provags-ID: V01U2FsdGVkX19Hfit+pllHjnryEPhkxMIYiOroaN0udh945pJh7A x45NY8a8F9nwt3 In-Reply-To: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:116592 Archived-At: >> I guess it is just that these GUI toolkit people usually are trained to >> deliver good looking and pixel-precise artwork and in consequence might >> have some difficulties to imagine how it can be "pretty much impossibe" >> for some editor to know how many lines it is actually displaying (or >> anyway that such editor would still want to use their scrollbars). > > Emacs _does_ know how many lines it's displaying. > > What it doesn't know is how many lines are in the entire file, or more > precisely, the "height" of the entire file as rendered, which > essentially requires rendering the _entire thing_ (it can't be > calculated from logical number of lines because it depends on the exact > characters rendered). That's a pretty nasty requirement for a non-toy > editor... The simple rule is: First do it right, then do it fast. Try to make it work for small files and then you can still think about how to get equally good results with larger ones. --- grischka