emacs-devel
[Top][All Lists]
Advanced

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

Problem with scroll-bar dragging and patch.


From: Luc Teirlinck
Subject: Problem with scroll-bar dragging and patch.
Date: Mon, 21 Apr 2003 19:56:11 -0500 (CDT)

This concerns the latest Emacs CVS configured with  

./configure --without-toolkit-scroll-bars

Actually, it might be interesting for people who are using various
non-native scrollbars to see whether the problem occurs for them too.
My patch applies to the native scrollbar.

Do M-10000 a in  a standard size Emacs frame.  We can not scroll with
Mouse-2 at all.  Add a final newline.  Now we can only scroll to two
positions: the very top and an empty completely overscrolled screen.

Note that this buffer is, of course, completely unnatural.  However,
such large newline-less output often gets produced by programs and one
definitely can not always just M-q that output.

I made changes in three functions.  For two of them I do not even know
whether they are actually still used anywhere, but the change in them
is consistent with the similar change in scroll-bar-drag-1, the only
one of the three that apparently matters.  Because scroll-bar.el is
pre-loaded, you may have to do C-M-x on scroll-bar-drag-1 to notice
the difference.

Change Log:

2003-04-21  Luc Teirlinck  <address@hidden>

        * scroll-bar.el (scroll-bar-set-window-start,
        scroll-bar-drag-position, scroll-bar-drag-1):
        Replace beginning-of-line with vertical-motion.   

Patch:

===File ~/scroll-bar-diff===================================
cd /usr/local/share/emacs/21.3.50/lisp/
diff -c /usr/local/share/emacs/21.3.50/lisp/scroll-bar.old.el 
/usr/local/share/emacs/21.3.50/lisp/scroll-bar.el
*** /usr/local/share/emacs/21.3.50/lisp/scroll-bar.old.el       Wed Apr  2 
13:58:36 2003
--- /usr/local/share/emacs/21.3.50/lisp/scroll-bar.el   Mon Apr 21 18:36:36 2003
***************
*** 170,176 ****
        (goto-char (+ (point-min)
                      (scroll-bar-scale portion-whole
                                        (- (point-max) (point-min)))))
!       (beginning-of-line)
        (set-window-start window (point))))))
  
  (defun scroll-bar-drag-position (portion-whole)
--- 170,176 ----
        (goto-char (+ (point-min)
                      (scroll-bar-scale portion-whole
                                        (- (point-max) (point-min)))))
!       (vertical-motion 0)
        (set-window-start window (point))))))
  
  (defun scroll-bar-drag-position (portion-whole)
***************
*** 179,185 ****
      (goto-char (+ (point-min)
                  (scroll-bar-scale portion-whole
                                    (- (point-max) (point-min)))))
!     (beginning-of-line)
      (point)))
  
  (defun scroll-bar-maybe-set-window-start (event)
--- 179,185 ----
      (goto-char (+ (point-min)
                  (scroll-bar-scale portion-whole
                                    (- (point-max) (point-min)))))
!     (vertical-motion 0)
      (point)))
  
  (defun scroll-bar-maybe-set-window-start (event)
***************
*** 218,224 ****
        (goto-char (+ (point-min)
                    (scroll-bar-scale portion-whole
                                      (- (point-max) (point-min)))))
!       (beginning-of-line)
        (set-window-start window (point)))))
  
  (defun scroll-bar-drag (event)
--- 218,224 ----
        (goto-char (+ (point-min)
                    (scroll-bar-scale portion-whole
                                      (- (point-max) (point-min)))))
!       (vertical-motion 0)
        (set-window-start window (point)))))
  
  (defun scroll-bar-drag (event)

Diff finished at Mon Apr 21 18:47:32
============================================================




reply via email to

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