From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#998: after split-window-horizontally scroll works only on first window Date: Wed, 24 Sep 2008 11:35:21 +0200 Message-ID: <48DA09D9.9010407@gmx.at> References: <20080918134412.GH3430@zinosat.homelinux.com> <48D29A54.2050605@gmx.at> <20080919065012.GI3430@zinosat.homelinux.com> <48D34E41.9090301@gmx.at> <20080919073544.GJ3430@zinosat.homelinux.com> <48D365FB.8010007@gmx.at> <20080919112310.GK3430@zinosat.homelinux.com> Reply-To: martin rudalics , 998@emacsbugs.donarmstrong.com 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: ger.gmane.org 1222249817 14098 80.91.229.12 (24 Sep 2008 09:50:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2008 09:50:17 +0000 (UTC) Cc: 998@emacsbugs.donarmstrong.com To: Davide Viti Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 24 11:51:11 2008 connect(): Connection refused 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.50) id 1KiR1Y-0000E2-6h for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Sep 2008 11:51:08 +0200 Original-Received: from localhost ([127.0.0.1]:55991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiR0V-0005Fy-Q3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Sep 2008 05:50:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KiR0Q-0005Fi-Im for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2008 05:49:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KiR0O-0005FV-Vf for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2008 05:49:57 -0400 Original-Received: from [199.232.76.173] (port=46700 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiR0O-0005FS-Ph for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2008 05:49:56 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46614) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KiR0O-0008AI-4l for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2008 05:49:56 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8O9nrM4028673; Wed, 24 Sep 2008 02:49:54 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8O9j3ZV027522; Wed, 24 Sep 2008 02:45:03 -0700 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 24 Sep 2008 09:45:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 998 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 998-submit@emacsbugs.donarmstrong.com id=B998.122224914826321 (code B ref 998); Wed, 24 Sep 2008 09:45:03 +0000 Original-Received: (at 998) by emacsbugs.donarmstrong.com; 24 Sep 2008 09:39:08 +0000 Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8O9d4wi026305 for <998@emacsbugs.donarmstrong.com>; Wed, 24 Sep 2008 02:39:06 -0700 Original-Received: (qmail invoked by alias); 24 Sep 2008 09:38:58 -0000 Original-Received: from 62-47-41-49.adsl.highway.telekom.at (EHLO [62.47.41.49]) [62.47.41.49] by mail.gmx.net (mp022) with SMTP; 24 Sep 2008 11:38:58 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/ydUE8uW/ygWxdETsWkcqiFnd6yX5RoPVtQi0Akh tuiDJPzAOVE4+l User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <20080919112310.GK3430@zinosat.homelinux.com> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.68 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 24 Sep 2008 05:49:57 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:20723 Archived-At: I've been able to reproduce the bug by clicking the small dart above the scrollbar of a right window and subsequently scrolling the mouse-wheel. In that case the `event' argument passed to `scroll-bar-toolkit-scroll' invariantly names the left (sometimes the minibuffer) window. When I sample the mouse explicitly the bug doesn't occur. Davide, could you try to append the code below to your .emacs and see whether it makes the bug go away? Thanks, martin. (defun scroll-bar-toolkit-scroll (event) (interactive "e") (let* ((end-position (event-end event)) (mouse-position (mouse-position)) (window (condition-case nil (window-at (cadr mouse-position) (cddr mouse-position) (car mouse-position)) (error (nth 0 end-position)))) (part (nth 4 end-position)) before-scroll) (unless (eq part 'end-scroll) (with-selected-window window (setq before-scroll (or point-before-scroll (point))) (cond ((eq part 'above-handle) (scroll-up '-)) ((eq part 'below-handle) (scroll-up nil)) ((eq part 'ratio) (let* ((portion-whole (nth 2 end-position)) (lines (scroll-bar-scale portion-whole (1- (window-height))))) (scroll-up (cond ((not (zerop lines)) lines) ((< (car portion-whole) 0) -1) (t 1))))) ((eq part 'up) (scroll-up -1)) ((eq part 'down) (scroll-up 1)) ((eq part 'top) (set-window-start window (point-min))) ((eq part 'bottom) (goto-char (point-max)) (recenter)) ((eq part 'handle) (scroll-bar-drag-1 event)))) (sit-for 0) (with-current-buffer (window-buffer window) (setq point-before-scroll before-scroll)))))