Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
71572c03
Commit
71572c03
authored
Feb 28, 2010
by
Jan Djärv
Browse files
scroll-bar.el (scroll-bar-drag-1): Add save-excursion, bug #5654.
parent
412c01b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/scroll-bar.el
lisp/scroll-bar.el
+8
-7
No files found.
lisp/ChangeLog
View file @
71572c03
2010-02-28 Jan Djärv <jan.h.d@swipnet.se>
* scroll-bar.el (scroll-bar-drag-1): Add save-excursion, bug #5654.
2010-02-28 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-handle-write-region): START can be a string.
...
...
lisp/scroll-bar.el
View file @
71572c03
...
...
@@ -210,13 +210,14 @@ EVENT should be a scroll bar click or drag event."
(
let*
((
start-position
(
event-start
event
))
(
window
(
nth
0
start-position
))
(
portion-whole
(
nth
2
start-position
)))
(
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
)))))
(
set-window-start
window
(
point
)))))
)
(
defun
scroll-bar-drag
(
event
)
"Scroll the window by dragging the scroll bar slider.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment