Function: ghostel--scroll-intercept-up
ghostel--scroll-intercept-up is an interactive and natively compiled
function defined in ghostel.el.
Signature
(ghostel--scroll-intercept-up EVENT)
Documentation
Intercept wheel-up EVENT for terminal mouse tracking.
If the terminal is tracking mouse events, forward as button 4. Otherwise, re-dispatch EVENT through the normal event loop so the user's scroll package handles it.
Key Bindings
ghostel--scroll-intercept-map <mouse-4> ghostel--scroll-intercept-map <wheel-up>
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--scroll-intercept-up (event)
"Intercept wheel-up EVENT for terminal mouse tracking.
If the terminal is tracking mouse events, forward as button 4.
Otherwise, re-dispatch EVENT through the normal event loop so the
user's scroll package handles it."
(interactive "e")
;; Wheel events on an unselected window are dispatched with
;; `current-buffer' set to the selected window's buffer. Run the
;; intercept in the event's own buffer so buffer-local state
;; (`ghostel--term', `ghostel--scroll-intercept-active', the
;; `pre-command-hook' re-enable) lands in the ghostel buffer.
(with-current-buffer (window-buffer (ghostel--event-window event))
(unless (ghostel--forward-scroll-event event 4)
(ghostel--redispatch-scroll-event event))))