Changeset 3866 for releases

Show
Ignore:
Timestamp:
09/10/05 23:47:33 (3 years ago)
Author:
horiguti
Message:

Cancel previous change.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/KIKYOU-2.00/lisp/ChangeLog.Meadow

    r3865 r3866  
     12005-09-10  Kyotaro HORIGUCHI <horiguti@meadowy.org> 
     2 
     3        * mw32scroll.el: Cancel previous change 
     4 
    152005-09-10  Kyotaro HORIGUCHI <horiguti@meadowy.org> 
    26 
  • releases/KIKYOU-2.00/lisp/mw32scroll.el

    r3865 r3866  
    4040                    (scroll-bar-scale portion-whole 
    4141                                      (- (point-max) (point-min))))) 
    42       (vertical-motion 0
     42      (beginning-of-line
    4343      (set-window-start window (point))))) 
    4444 
     
    7373                              (nth 2 start-position) 
    7474                              (- (point-max) (point-min))))) 
    75                (vertical-motion 0
     75               (beginning-of-line
    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   (save-excursion 
    116     (goto-char (window-start)) 
    117     (vertical-motion line) 
    118     (set-window-start (selected-window) (point)))) 
     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)))))) 
    119143 
    120144(defun w32-handle-scroll-bar-event (event)