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
05786f2d
Commit
05786f2d
authored
Apr 08, 2008
by
Chong Yidong
Browse files
(mwheel-scroll): Deactivate any temporarily active region if point
moves.
parent
18cba22a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
lisp/mwheel.el
lisp/mwheel.el
+11
-1
No files found.
lisp/mwheel.el
View file @
05786f2d
...
...
@@ -190,6 +190,10 @@ This should only be bound to mouse buttons 4 and 5."
(
prog1
(
selected-window
)
(
select-window
(
mwheel-event-window
event
)))))
(
buffer
(
window-buffer
curwin
))
(
opoint
(
with-current-buffer
buffer
(
when
(
eq
(
car-safe
transient-mark-mode
)
'only
)
(
point
))))
(
mods
(
delq
'click
(
delq
'double
(
delq
'triple
(
event-modifiers
event
)))))
(
amt
(
assoc
mods
mouse-wheel-scroll-amount
)))
...
...
@@ -224,7 +228,13 @@ This should only be bound to mouse buttons 4 and 5."
;; Make sure we do indeed scroll to the end of the buffer.
(
end-of-buffer
(
while
t
(
scroll-up
)))))
(
t
(
error
"Bad binding in mwheel-scroll"
))))
(
if
curwin
(
select-window
curwin
))))
(
if
curwin
(
select-window
curwin
)))
;; If there is a temporarily active region, deactivate it iff
;; scrolling moves point.
(
when
opoint
(
with-current-buffer
buffer
(
when
(
/=
opoint
(
point
))
(
deactivate-mark
)))))
(
when
(
and
mouse-wheel-click-event
mouse-wheel-inhibit-click-time
)
(
if
mwheel-inhibit-click-event-timer
(
cancel-timer
mwheel-inhibit-click-event-timer
)
...
...
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