From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14324: 24.3; GTK scrollbar doesn't scroll proportionally when Line Wrapping is set to "Truncate Long Lines" Date: Thu, 09 May 2013 15:33:20 -0400 Message-ID: References: <87ehdseyts.fsf@archaeopteryx.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1368128048 20743 80.91.229.3 (9 May 2013 19:34:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 May 2013 19:34:08 +0000 (UTC) Cc: 14324@debbugs.gnu.org To: j.pertres@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 09 21:34:05 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UaWbL-0005Jm-3p for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 May 2013 21:34:03 +0200 Original-Received: from localhost ([::1]:47227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaWbK-0007Ik-H5 for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 May 2013 15:34:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaWbG-0007IX-31 for bug-gnu-emacs@gnu.org; Thu, 09 May 2013 15:34:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaWbE-0007T4-Rj for bug-gnu-emacs@gnu.org; Thu, 09 May 2013 15:33:58 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaWbE-0007Sz-OU for bug-gnu-emacs@gnu.org; Thu, 09 May 2013 15:33:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UaWbK-0006bM-35 for bug-gnu-emacs@gnu.org; Thu, 09 May 2013 15:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2013 19:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14324 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14324-submit@debbugs.gnu.org id=B14324.136812801025292 (code B ref 14324); Thu, 09 May 2013 19:34:02 +0000 Original-Received: (at 14324) by debbugs.gnu.org; 9 May 2013 19:33:30 +0000 Original-Received: from localhost ([127.0.0.1]:34993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UaWan-0006Zr-Kc for submit@debbugs.gnu.org; Thu, 09 May 2013 15:33:29 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:58241) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UaWal-0006Ze-VU for 14324@debbugs.gnu.org; Thu, 09 May 2013 15:33:28 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r49JXKIF002252; Thu, 9 May 2013 15:33:21 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id BFCACB40D8; Thu, 9 May 2013 15:33:20 -0400 (EDT) In-Reply-To: <87ehdseyts.fsf@archaeopteryx.i-did-not-set--mail-host-address--so-tickle-me> (j. pertres's message of "Tue, 30 Apr 2013 19:02:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4574=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4574> : streams <957406> : uri <1415870> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74105 Archived-At: > 1. Visit a buffer with very long lines, and long enough to make > Emacs render a vertical scrollbar. > 2. In the Options menu, set the option "Line Wrapping" to "Truncate > Long Lines". > 3. Drag the scrollbar to navigate the file. Emacs won't scroll > proportionally, but rather get stuck at some points, seemingly at > those very long lines, maybe as if they were still shown in multiple > lines, even though now they don't. Indeed. The scrollbar's thumb is placed based on character positions in the buffer, which is used as an approximation for the "pixel position" on the rendering of the buffer. There are various circumstances where this approximation is poor, basically when some part of the buffer has a visual size that is disconnected from its character size, e.g. when you use something like outline-minor-mode, or when you have (large) images in the buffer, or when (very long) lines are truncated. I don't see any easy way to fix it. I fear fixing it would require a complete redesign of the rendering engine. We could probably "fix" your case by adding a line-cache, such that the scrollbar thumb's position can be computed based on line positions rather than char positions when lines are truncated. Patch welcome. Stefan