Changeset 3877

Show
Ignore:
Timestamp:
2005年09月16日 19時47分53秒 (3 years ago)
Author:
horiguti
Message:

r3867 fixed the problem partially. Fix it.

Files:

Legend:

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

    r3867 r3877  
     12005-09-16  Kyotaro HORIGUCHI <horiguti@meadowy.org> 
     2 
     3        * mw32scroll.el (w32-scroll-bar-drag-1): Removed. 
     4        (w32-scroll-bar-drag): Bug fix of previous change.  Fixed issue 
     5        MW137. 
     6 
    172005-09-10  Kyotaro HORIGUCHI <horiguti@meadowy.org> 
    28 
  • branches/2.0/lisp/mw32scroll.el

    r3867 r3877  
    2828    (beginning-of-line) 
    2929    (point))) 
    30  
    31 ;; Scroll the window to the proper position for EVENT. 
    32 (defsubst w32-scroll-bar-drag-1 (event) 
    33   (let* ((start-position (event-start event)) 
    34          (window (nth 0 start-position)) 
    35          (portion-whole (nth 2 start-position))) 
    36     (save-excursion 
    37       (set-buffer (window-buffer window)) 
    38       ;; Calculate position relative to the accessible part of the buffer. 
    39       (goto-char (+ (point-min) 
    40                     (scroll-bar-scale portion-whole 
    41                                       (- (point-max) (point-min))))) 
    42       (vertical-motion 0) 
    43       (set-window-start window (point))))) 
    4430 
    4531;;; for normal dragging 
     
    6147      (setq before-scroll 
    6248            (or before-scroll (point)))) 
    63     (w32-scroll-bar-drag-1 event) 
    6449    (save-excursion 
    6550      (set-buffer (window-buffer window)) 
     
    7358                              (nth 2 start-position) 
    7459                              (- (point-max) (point-min))))) 
    75                (vertical-motion 0) 
    76                (set-window-start window (point))) 
    77               (t 
     60               (back-to-previous-visible-line-start window) 
     61               (set-window-start 
     62                window 
     63                (car 
     64                 (compute-motion (line-beginning-position) 
     65                                 '(0 . 0) 
     66                                 (point-max) 
     67                                 (cons 0 
     68                                       (nth 2 
     69                                            (compute-motion  
     70                                             (line-beginning-position) 
     71                                             '(0 . 0) 
     72                                             (point) 
     73                                             (cons (window-width) 
     74                                                   (window-height)) 
     75                                             (window-width) 
     76                                             (cons (window-hscroll) 0) 
     77                                             window))) 
     78                                 (window-width) 
     79                                 (cons (window-hscroll) 0) 
     80                                 window))) 
     81               (goto-char 
     82                (car 
     83                 (compute-motion 
     84                  (window-start window) 
     85                  '(0 . 0) 
     86                  (point-max) 
     87                  (cons 0 (/ (window-height) 2)) 
     88                  (window-width) 
     89                  (cons (window-hscroll) 0) 
     90                  window)))) 
     91               (t 
    7892               ;; Exit when we get the drag event; store unread-command-events 
    7993               (setq unread-command-events 
  • branches/2.0/src/ChangeLog.Meadow

    r3581 r3877  
     12005-09-16  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
     2 
     3        * indent.c (back-to-previous-visible-line-start): New lisp 
     4        function. 
     5 
    162005-01-04  Masayuki FUJII  <boochang@m4.kcn.ne.jp> 
    27 
  • branches/2.0/src/indent.c

    r3104 r3877  
    19561956} 
    19571957 
     1958#ifdef MEADOW 
     1959DEFUN ("back-to-previous-visible-line-start", 
     1960       Fback_to_previous_visible_line_start,  
     1961       Sback_to_previous_visible_line_start, 0, 1, 0, 
     1962       "If position is invisible, back to beginning of preveous visible line.") 
     1963  (window) 
     1964     Lisp_Object window; 
     1965{ 
     1966  struct window *w; 
     1967  struct it it; 
     1968  struct text_pos pt; 
     1969 
     1970  if (! NILP (window)) 
     1971    CHECK_WINDOW (window, 0); 
     1972  else 
     1973    window = selected_window; 
     1974  w = XWINDOW (window); 
     1975 
     1976  SET_TEXT_POS (pt, PT, PT_BYTE); 
     1977  start_display (&it, w, pt); 
     1978   
     1979  while (it.selective > 0 && IT_CHARPOS (it) > BEGV) 
     1980    { 
     1981      double val; 
     1982      int opt, opt_byte; 
     1983 
     1984      opt = PT; 
     1985      opt_byte = PT_BYTE; 
     1986      SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 
     1987      while (PT > BEGV && FETCH_BYTE (PT_BYTE) == '\n') 
     1988        scan_newline (PT - 1, PT_BYTE - 1, BEGV, BEGV_BYTE, -1, 0); 
     1989       
     1990      val = position_indentation (PT_BYTE); 
     1991      SET_PT_BOTH (opt, opt_byte); 
     1992       
     1993      if (val < (double)it.selective) break; 
     1994 
     1995      /* back to previous line start */ 
     1996      IT_CHARPOS (it) = find_next_newline_no_quit (IT_CHARPOS (it) - 1, -1); 
     1997      IT_BYTEPOS (it) = CHAR_TO_BYTE (IT_CHARPOS (it)); 
     1998    } 
     1999  SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); 
     2000 
     2001  return Qnil; 
     2002} 
     2003#endif /* MEADOW */ 
     2004 
    19582005DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 2, 0, 
    19592006  "Move point to start of the screen line LINES lines down.\n\ 
     
    20252072  indent_tabs_mode = 1; 
    20262073 
     2074#ifdef MEADOW 
     2075  defsubr (&Sback_to_previous_visible_line_start); 
     2076#endif 
    20272077  defsubr (&Scurrent_indentation); 
    20282078  defsubr (&Sindent_to);