Changeset 3860

Show
Ignore:
Timestamp:
09/09/05 03:54:45 (3 years ago)
Author:
horiguti
Message:

* mw32scroll.el (w32-scroll-bar-drag): Avoid showing invisible
portion of buffer in scrolling.
Fixed issue MW137.

(scroll-but-point): Ditto.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/ChangeLog.Meadow

    r3853 r3860  
     12005-09-09  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
     2 
     3        * mw32scroll.el (w32-scroll-bar-drag): Avoid showing invisible 
     4        portion of buffer in scrolling. 
     5        Fixed issue MW137. 
     6 
     7        (scroll-but-point): Ditto. 
     8 
    192005-09-04  Masayuki FUJII  <boochang@m4.kcn.ne.jp> 
    210 
  • trunk/lisp/mw32scroll.el

    r3827 r3860  
    8484                      (* upper-ratio 
    8585                         (- (car (nth 2 start-position)) scrollbar-epoch)))))) 
    86                (set-window-start window (line-beginning-position)) 
     86 
     87               ;; move to beginning of display-line in visible portion 
     88               (vertical-motion 0) 
     89               (set-window-start window (point)) 
     90 
    8791               (setq pos (compute-motion (window-start) '(0 . 0) 
    8892                                         (point-max) 
     
    132136If the point is out of the window, the point is moved to the 
    133137center of the window." 
    134   (if (>= line 0) 
    135       (let* ((winstpoint (window-start)) 
    136              (position (compute-motion winstpoint '(0 . 0) 
    137                                        (point-max) (cons 0 line) 
    138                                        (window-width) (cons (window-hscroll) 0) 
    139                                        (selected-window)))) 
    140         (set-window-start (selected-window) (car position))) 
    141  
    142     (save-excursion 
    143       (let ((winst1point (window-start)) 
    144             winst2point 
    145             position1 
    146             position2 
    147             finline-2) 
    148         (goto-char (window-start)) 
    149         (forward-line line) 
    150         (beginning-of-line) 
    151         (setq winst2point (point)) 
    152         (setq position1 (compute-motion winst2point '(0 . 0) 
    153                                         winst1point (cons 0 (- line)) 
    154                                        (window-width) (cons (window-hscroll) 0) 
    155                                        (selected-window))) 
    156         (setq finline-2 (+ (nth 2 position1) line)) 
    157         (setq position2 (compute-motion winst2point '(0 . 0) 
    158                                         winst1point (cons 0 finline-2) 
    159                                        (window-width) (cons (window-hscroll) 0) 
    160                                        (selected-window))) 
    161         (set-window-start (selected-window) (car position2)))))) 
     138  (save-excursion 
     139    (goto-char (window-start)) 
     140    (vertical-motion line) 
     141    (set-window-start (selected-window) (point)))) 
    162142 
    163143(defun w32-handle-scroll-bar-event (event)