diff options
| author | Eli Zaretskii | 2014-08-18 17:39:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-08-18 17:39:26 +0300 |
| commit | a8626b7ec10c36440c2801e0433bb122e331b3e8 (patch) | |
| tree | f0c2c33b2ef59a51ba8ec6034016c7196cd726dd | |
| parent | 39125b22488ab597dd137a174700fcaab616d597 (diff) | |
| download | emacs-a8626b7ec10c36440c2801e0433bb122e331b3e8.tar.gz emacs-a8626b7ec10c36440c2801e0433bb122e331b3e8.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/scroll-bar.el | 11 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a1d3b94427..1ee5ca6a3b7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-08-18 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * scroll-bar.el (scroll-bar-horizontal-drag-1) | ||
| 4 | (scroll-bar-toolkit-horizontal-scroll): When determining the | ||
| 5 | paragraph direction, use the buffer of the window designated in | ||
| 6 | the event. | ||
| 7 | |||
| 1 | 2014-08-16 Andreas Schwab <schwab@linux-m68k.org> | 8 | 2014-08-16 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 9 | ||
| 3 | * vc/diff-mode.el (diff-fixup-modifs): Handle empty line in | 10 | * 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." | |||
| 327 | (window (nth 0 start-position)) | 327 | (window (nth 0 start-position)) |
| 328 | (portion-whole (nth 2 start-position)) | 328 | (portion-whole (nth 2 start-position)) |
| 329 | (unit (frame-char-width (window-frame window)))) | 329 | (unit (frame-char-width (window-frame window)))) |
| 330 | (if (eq (current-bidi-paragraph-direction) 'left-to-right) | 330 | (if (eq (current-bidi-paragraph-direction (window-buffer window)) |
| 331 | 'left-to-right) | ||
| 331 | (set-window-hscroll | 332 | (set-window-hscroll |
| 332 | window (/ (1- (+ (car portion-whole) unit)) unit)) | 333 | window (/ (1- (+ (car portion-whole) unit)) unit)) |
| 333 | (set-window-hscroll | 334 | (set-window-hscroll |
| @@ -454,9 +455,11 @@ EVENT should be a scroll bar click." | |||
| 454 | (let* ((end-position (event-end event)) | 455 | (let* ((end-position (event-end event)) |
| 455 | (window (nth 0 end-position)) | 456 | (window (nth 0 end-position)) |
| 456 | (part (nth 4 end-position)) | 457 | (part (nth 4 end-position)) |
| 457 | (bidi-factor (if (eq (current-bidi-paragraph-direction) 'left-to-right) | 458 | (bidi-factor |
| 458 | 1 | 459 | (if (eq (current-bidi-paragraph-direction (window-buffer window)) |
| 459 | -1)) | 460 | 'left-to-right) |
| 461 | 1 | ||
| 462 | -1)) | ||
| 460 | before-scroll) | 463 | before-scroll) |
| 461 | (cond | 464 | (cond |
| 462 | ((eq part 'end-scroll)) | 465 | ((eq part 'end-scroll)) |