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: Fri, 19 Sep 2008 09:01:21 +0200 Message-ID: <48D34E41.9090301@gmx.at> References: <20080918134412.GH3430@zinosat.homelinux.com> <48D29A54.2050605@gmx.at> <20080919065012.GI3430@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 1221809312 24441 80.91.229.12 (19 Sep 2008 07:28:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2008 07:28:32 +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 Fri Sep 19 09:29:29 2008 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 1KgaQh-0007bk-UN for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2008 09:29:28 +0200 Original-Received: from localhost ([127.0.0.1]:56059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgaPg-0002mv-Dr for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2008 03:28:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgaOx-0002Bx-Os for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgaOw-0002Aq-8f for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:39 -0400 Original-Received: from [199.232.76.173] (port=54973 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgaOv-0002AY-PR for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:37 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:26544) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KgaOv-0001pr-7n for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:37 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KgaOu-0004Zw-Fg for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 03:27:36 -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 m8J7RZKo006196; Fri, 19 Sep 2008 00:27:35 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8J7A4DO032266; Fri, 19 Sep 2008 00:10:04 -0700 X-Loop: don@donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 19 Sep 2008 07:10:04 +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.122180785029542 (code B ref 998); Fri, 19 Sep 2008 07:10:04 +0000 Original-Received: (at 998) by emacsbugs.donarmstrong.com; 19 Sep 2008 07:04:10 +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 m8J7463h029535 for <998@emacsbugs.donarmstrong.com>; Fri, 19 Sep 2008 00:04:08 -0700 Original-Received: (qmail invoked by alias); 19 Sep 2008 07:04:00 -0000 Original-Received: from 62-47-44-24.adsl.highway.telekom.at (EHLO [62.47.44.24]) [62.47.44.24] by mail.gmx.net (mp025) with SMTP; 19 Sep 2008 09:04:00 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+36RZUP2y31eG1xMyfsdfYcspCITMoarzE31W8nX wQwi9fAGk8OP3M User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <20080919065012.GI3430@zinosat.homelinux.com> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Fri, 19 Sep 2008 03:27:39 -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:20642 Archived-At: > (translated from ) at that spot runs the command scroll-bar-toolkit-scroll > which is an interactive compiled Lisp function in `scroll-bar.el'. OK. Could you now please append the following modified version of `scroll-bar-toolkit-scroll' to your .emacs, restart Emacs, split the window horizontally, move the mouse into each of these windows, scroll the mouse and tell me whether the windows mentioned in the messages you should see (here I get for example .... #) have the same or different values. Thanks, martin. ;; code starts here (defun scroll-bar-toolkit-scroll (event) (interactive "e") (let* ((end-position (event-end event)) (window (nth 0 end-position)) (part (nth 4 end-position)) before-scroll) (message ".... %s" window) (cond ((eq part 'end-scroll)) (t (with-current-buffer (window-buffer window) (setq before-scroll point-before-scroll)) (save-selected-window (select-window window) (setq before-scroll (or 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)))))) ;; code ends here