summaryrefslogtreecommitdiff
path: root/lisp/scroll-bar.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/scroll-bar.el')
-rw-r--r--lisp/scroll-bar.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 739670cb1c9..1af70b0d631 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -327,8 +327,11 @@ 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))))
- (set-window-hscroll
- window (/ (1- (+ (car portion-whole) unit)) unit))))
+ (if (eq (current-bidi-paragraph-direction) 'left-to-right)
+ (set-window-hscroll
+ window (/ (1- (+ (car portion-whole) unit)) unit))
+ (set-window-hscroll
+ window (/ (1- (+ (cdr portion-whole) unit)) unit)))))
(defun scroll-bar-horizontal-drag (event)
"Scroll the window horizontally by dragging the scroll bar slider.