From: Eli Zaretskii Date: Mon, 18 Aug 2014 14:39:26 +0000 (+0300) Subject: Fix horizontal scrolling in non-selected windows. X-Git-Tag: emacs-25.0.90~2635^2~679^2~459 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a8626b7ec10c36440c2801e0433bb122e331b3e8;p=emacs.git Fix horizontal scrolling in non-selected windows. lisp/scroll-bar.el (scroll-bar-horizontal-drag-1) (scroll-bar-toolkit-horizontal-scroll): When determining the paragraph direction, use the buffer of the window designated in the event. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a1d3b94427..1ee5ca6a3b7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-08-18 Eli Zaretskii + + * scroll-bar.el (scroll-bar-horizontal-drag-1) + (scroll-bar-toolkit-horizontal-scroll): When determining the + paragraph direction, use the buffer of the window designated in + the event. + 2014-08-16 Andreas Schwab * vc/diff-mode.el (diff-fixup-modifs): Handle empty line in diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el index 1af70b0d631..f803eb7f928 100644 --- a/lisp/scroll-bar.el +++ b/lisp/scroll-bar.el @@ -327,7 +327,8 @@ If you click outside the slider, the window scrolls to bring the slider there." (window (nth 0 start-position)) (portion-whole (nth 2 start-position)) (unit (frame-char-width (window-frame window)))) - (if (eq (current-bidi-paragraph-direction) 'left-to-right) + (if (eq (current-bidi-paragraph-direction (window-buffer window)) + 'left-to-right) (set-window-hscroll window (/ (1- (+ (car portion-whole) unit)) unit)) (set-window-hscroll @@ -454,9 +455,11 @@ EVENT should be a scroll bar click." (let* ((end-position (event-end event)) (window (nth 0 end-position)) (part (nth 4 end-position)) - (bidi-factor (if (eq (current-bidi-paragraph-direction) 'left-to-right) - 1 - -1)) + (bidi-factor + (if (eq (current-bidi-paragraph-direction (window-buffer window)) + 'left-to-right) + 1 + -1)) before-scroll) (cond ((eq part 'end-scroll))