summaryrefslogtreecommitdiff
path: root/lisp/scroll-bar.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2014-08-16 17:47:38 +0200
committerMartin Rudalics <rudalics@gmx.at>2014-08-16 17:47:38 +0200
commit266821b087057c25c5f7169d832b0bdc8b8a0aa5 (patch)
tree85b58a3f30f4bb732a65659eaa7ddef87fb10cab /lisp/scroll-bar.el
parented30c57cc9cdcf8ddc169f4b042146db9b3b7179 (diff)
downloademacs-266821b087057c25c5f7169d832b0bdc8b8a0aa5.tar.gz
Preliminary attempt to fix horizontal scroll bar dragging with bidi text.
* w32term.c (w32_horizontal_scroll_bar_handle_click): In y part of emacs_event return length from si.nPage to si.nMax. * xdisp.c (set_horizontal_scroll_bar): For right-to-left text interchange start and end of thumb. * scroll-bar.el (scroll-bar-horizontal-drag-1): Use cdr of portion-whole for scrolling right-to-left text.
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.