[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes in frame/window code

From: martin rudalics
Subject: Re: Changes in frame/window code
Date: Wed, 30 Jul 2014 18:05:09 +0200

>> Do you mean that when you click on the slider the value of
>> suspend_auto_hscroll is reset?
> No, I mean the slider jumps back to the left edge, whereas it started
> at the right edge (which is correct for R2L lines).

The following pretty crude version of `scroll-bar-horizontal-drag-1' fixes this

(defun scroll-bar-horizontal-drag-1 (event)
  (let* ((start-position (event-start event))
         (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)
         window (/ (1- (+ (car portion-whole) unit)) unit))
       window (- (window-text-width) (/ (1- (+ (car portion-whole) unit)) 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]