unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problem with scroll-bar dragging and patch.
@ 2003-04-22  0:56 Luc Teirlinck
  2003-04-23 13:54 ` Luc Teirlinck
  2003-04-24  4:36 ` Luc Teirlinck
  0 siblings, 2 replies; 3+ messages in thread
From: Luc Teirlinck @ 2003-04-22  0:56 UTC (permalink / raw)


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  <teirllm@mail.auburn.edu>

        * 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
============================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with scroll-bar dragging and patch.
  2003-04-22  0:56 Problem with scroll-bar dragging and patch Luc Teirlinck
@ 2003-04-23 13:54 ` Luc Teirlinck
  2003-04-24  4:36 ` Luc Teirlinck
  1 sibling, 0 replies; 3+ messages in thread
From: Luc Teirlinck @ 2003-04-23 13:54 UTC (permalink / raw)
  Cc: emacs-devel

I submitted, earlier in this thread, a patch for scroll-bar.el
replacing three occurrences of (beginning-of-line) with
(vertical-motion 0).  Please do not apply that patch yet.  I believe
it should actually be three times (vertical-motion 0 window), because
the window in question is not necessarily selected.  (Sorry for my
sloppiness.)  I will submit a corrected patch later today.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with scroll-bar dragging and patch.
  2003-04-22  0:56 Problem with scroll-bar dragging and patch Luc Teirlinck
  2003-04-23 13:54 ` Luc Teirlinck
@ 2003-04-24  4:36 ` Luc Teirlinck
  1 sibling, 0 replies; 3+ messages in thread
From: Luc Teirlinck @ 2003-04-24  4:36 UTC (permalink / raw)
  Cc: emacs-devel

Below is a corrected change log entry and patch for the problem with
the scrollbar I described earlier.  The patch only changes one of the
three functions which my earlier patch changed, because the other two
functions seem completely irrelevant and the change in
scroll-bar-drag-position would generate a warning from the
byte-compiler.

Change Log:

2003-04-23  Luc Teirlinck  <teirllm@mail.auburn.edu>

        * scroll-bar.el (scroll-bar-drag-1): Replace beginning-of-line
        with vertical-motion.

Patch:

===File ~/scrollbar-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	Wed Apr 23 23:01:01 2003
***************
*** 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 window)
        (set-window-start window (point)))))
  
  (defun scroll-bar-drag (event)

Diff finished at Wed Apr 23 23:04:14
============================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-24  4:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-22  0:56 Problem with scroll-bar dragging and patch Luc Teirlinck
2003-04-23 13:54 ` Luc Teirlinck
2003-04-24  4:36 ` Luc Teirlinck

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).