[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99581: scroll-bar.el (scroll-bar-dra
From: |
Jan D. |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99581: scroll-bar.el (scroll-bar-drag-1): Add save-excursion, bug #5654. |
Date: |
Sun, 28 Feb 2010 15:37:20 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99581 [merge]
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sun 2010-02-28 15:37:20 +0100
message:
scroll-bar.el (scroll-bar-drag-1): Add save-excursion, bug #5654.
modified:
lisp/ChangeLog
lisp/scroll-bar.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-02-28 11:36:39 +0000
+++ b/lisp/ChangeLog 2010-02-28 14:36:24 +0000
@@ -1,3 +1,7 @@
+2010-02-28 Jan Djärv <address@hidden>
+
+ * scroll-bar.el (scroll-bar-drag-1): Add save-excursion, bug #5654.
+
2010-02-28 Michael Albinus <address@hidden>
* net/tramp.el (tramp-handle-write-region): START can be a string.
=== modified file 'lisp/scroll-bar.el'
--- a/lisp/scroll-bar.el 2010-01-13 08:35:10 +0000
+++ b/lisp/scroll-bar.el 2010-02-28 14:36:34 +0000
@@ -210,13 +210,14 @@
(let* ((start-position (event-start event))
(window (nth 0 start-position))
(portion-whole (nth 2 start-position)))
- (with-current-buffer (window-buffer window)
- ;; Calculate position relative to the accessible part of the buffer.
- (goto-char (+ (point-min)
- (scroll-bar-scale portion-whole
- (- (point-max) (point-min)))))
- (vertical-motion 0 window)
- (set-window-start window (point)))))
+ (save-excursion
+ (with-current-buffer (window-buffer window)
+ ;; Calculate position relative to the accessible part of the buffer.
+ (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)
"Scroll the window by dragging the scroll bar slider.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99581: scroll-bar.el (scroll-bar-drag-1): Add save-excursion, bug #5654.,
Jan D. <=