From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#5654: Even slightest scrollbar move warping point Date: Sun, 28 Feb 2010 12:41:44 +0100 Message-ID: <4B8A5678.1080404@swipnet.se> References: <4B892EB4.6030000@harpegolden.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1267358033 24232 80.91.229.12 (28 Feb 2010 11:53:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 28 Feb 2010 11:53:53 +0000 (UTC) Cc: 5654@debbugs.gnu.org To: David De La Harpe Golden Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 28 12:53:44 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NlhiR-00072V-S6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2010 12:53:44 +0100 Original-Received: from localhost ([127.0.0.1]:46872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NlhiR-0006Gg-9G for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Feb 2010 06:53:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NlhiE-0006Cf-5M for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2010 06:53:30 -0500 Original-Received: from [140.186.70.92] (port=37359 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NlhiD-0006CN-C1 for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2010 06:53:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NlhiB-0007JF-La for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2010 06:53:29 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42139) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NlhiB-0007J7-IS for bug-gnu-emacs@gnu.org; Sun, 28 Feb 2010 06:53:27 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NlhX7-0000Mi-Lm; Sun, 28 Feb 2010 06:42:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Feb 2010 11:42:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5654 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5654-submit@debbugs.gnu.org id=B5654.12673573131394 (code B ref 5654); Sun, 28 Feb 2010 11:42:01 +0000 Original-Received: (at 5654) by debbugs.gnu.org; 28 Feb 2010 11:41:53 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NlhWz-0000MR-7G for submit@debbugs.gnu.org; Sun, 28 Feb 2010 06:41:53 -0500 Original-Received: from smtprelay-h11.telenor.se ([62.127.194.4]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NlhWy-0000MJ-3Z for 5654@debbugs.gnu.org; Sun, 28 Feb 2010 06:41:52 -0500 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-h11.telenor.se (Postfix) with ESMTP id 112C784079 for <5654@debbugs.gnu.org>; Sun, 28 Feb 2010 12:41:50 +0100 (CET) X-SMTPAUTH-B2: X-SENDER-IP: 85.225.45.110 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtdNAN/kiUtV4S1uPGdsb2JhbACHWpNCDAEBAQE3LbhvhHsE X-IronPort-AV: E=Sophos;i="4.49,554,1262559600"; d="scan'208";a="43508384" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb2.telenor.se with ESMTP; 28 Feb 2010 12:41:45 +0100 Original-Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id 1DF5D7FA01A; Sun, 28 Feb 2010 12:41:45 +0100 (CET) User-Agent: Thunderbird 2.0.0.23 (X11/20090817) In-Reply-To: <4B892EB4.6030000@harpegolden.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 28 Feb 2010 06:42:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35351 Archived-At: It does not happen in 23.1. Reverting this change: 2009-11-13 Stefan Monnier * scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1) (scroll-bar-maybe-set-window-start): Use with-current-buffer. fixes it. I don't know if that is the right thing to do. Adding a save-excursion in scroll-bar-drag-1 also fixes it: --- lisp/scroll-bar.el 2010-01-13 08:35:10 +0000 +++ lisp/scroll-bar.el 2010-02-28 11:41:09 +0000 @@ -211,12 +211,13 @@ (window (nth 0 start-position)) (portion-whole (nth 2 start-position))) (with-current-buffer (window-buffer window) + (save-excursion ;; Calculate position relative to the accessible part of the buffer. (goto-char (+ (point-min) (scroll-bar-scale portion-whole (- (point-max) (point-min))))) (vertical-motion 0 window) - (set-window-start window (point))))) + (set-window-start window (point)))))) (defun scroll-bar-drag (event) "Scroll the window by dragging the scroll bar slider. Jan D. David De La Harpe Golden skrev: > Don't actually use the scrollbar very much, so not presently sure if > this was just always the way emacs acted and I simply didn't notice, but > right now (23.1.93), if you "move the scrollbar" a tiny bit (not enough > to actually visibly scroll the buffer), the point warps to the top of > the window. > > recipe: > > * emacs -Q on X11, with gtk+ (debian libgtk 2.18.6-1) toolkit scrollbars: > > place point somewhere other than start of buffer. (if you've just done > emacs -Q, it'll probably be at the end of the *scratch* buffer anyway). > > mouse-1 down on scrollbar. move even a tiny amount, not enough to > scroll. If you've just done emacs -Q, it'll already be at the top, so > you could just push it against the top, which you might not expect to do > anything, really. Point warps to window start. This happens before > you mouse-1 up. > > > * emacs -Q on X11, with lucid with toolkit scrollbars: (i.e. 90s-looking > 3d-effect scrollbar): > > same as gtk+ > > * emacs -Q on X11, with lucid without toolkit scrollbars (i.e. flat > looking scrollbar): > > no warp on mouse-1, but of course mouse-1 means something different for > these scrollbars - there is an immediate warp, but I think that's also > different since these scrollbars immediately scroll to a location > corresponding to the position on the scrollbar you mouse-2 down on. So > this case might be irrelevant and it's only something that's happening > for toolkit scrollbars. > > > > > > > > > > > >