Changeset 3867

Show
Ignore:
Timestamp:
09/11/05 00:49:16 (3 years ago)
Author:
horiguti
Message:

* mw32scroll.el (w32-scroll-bar-drag-1): Avoid showing invisible
portion of buffer in scrolling, and scrolling by display line.
Fixed issue MW137.
(w32-scroll-bar-drag): Ditto.
(scroll-but-point): Ditto.

Files:

Legend:

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

    r3411 r3867  
     12005-09-10  Kyotaro HORIGUCHI <horiguti@meadowy.org> 
     2 
     3        * mw32scroll.el (w32-scroll-bar-drag-1): Avoid showing invisible 
     4        portion of buffer in scrolling, and scrolling by display line. 
     5        Fixed issue MW137. 
     6        (w32-scroll-bar-drag): Ditto. 
     7        (scroll-but-point): Ditto. 
     8 
    192004-08-21  MIYOSHI Masanori  <miyoshi@meadowy.org> 
    210 
  • branches/2.0/lisp/mw32scroll.el

    r3104 r3867  
    4040                    (scroll-bar-scale portion-whole 
    4141                                      (- (point-max) (point-min))))) 
    42       (beginning-of-line
     42      (vertical-motion 0
    4343      (set-window-start window (point))))) 
    4444 
     
    7373                              (nth 2 start-position) 
    7474                              (- (point-max) (point-min))))) 
    75                (beginning-of-line
     75               (vertical-motion 0
    7676               (set-window-start window (point))) 
    7777              (t 
     
    113113(defun scroll-but-point (line) 
    114114  "Neglecting point, scroll current window. If the point is out of the window, the point is moved to the center of the window." 
    115   (if (>= line 0) 
    116       (let* ((winstpoint (window-start)) 
    117              (position (compute-motion winstpoint '(0 . 0)  
    118                                        (point-max) (cons 0 line) 
    119                                        (window-width) (cons (window-hscroll) 0) 
    120                                        (selected-window)))) 
    121         (set-window-start (selected-window) (car position))) 
    122  
    123     (save-excursion 
    124       (let ((winst1point (window-start)) 
    125             winst2point 
    126             position1 
    127             position2 
    128             finline-2) 
    129         (goto-char (window-start)) 
    130         (forward-line line) 
    131         (beginning-of-line) 
    132         (setq winst2point (point)) 
    133         (setq position1 (compute-motion winst2point '(0 . 0) 
    134                                         winst1point (cons 0 (- line)) 
    135                                        (window-width) (cons (window-hscroll) 0) 
    136                                        (selected-window))) 
    137         (setq finline-2 (+ (nth 2 position1) line)) 
    138         (setq position2 (compute-motion winst2point '(0 . 0) 
    139                                         winst1point (cons 0 finline-2) 
    140                                        (window-width) (cons (window-hscroll) 0) 
    141                                        (selected-window))) 
    142         (set-window-start (selected-window) (car position2)))))) 
     115  (save-excursion 
     116    (goto-char (window-start)) 
     117    (vertical-motion line) 
     118    (set-window-start (selected-window) (point)))) 
    143119 
    144120(defun w32-handle-scroll-bar-event (event)