Function: ghostel--mouse-drag-motion

ghostel--mouse-drag-motion is an interactive and natively compiled function defined in ghostel.el.

Signature

(ghostel--mouse-drag-motion EVENT)

Documentation

Forward mouse-movement EVENT as a motion event during a drag.

Bound in ghostel--mouse-drag-map while a drag is in progress. Labels the motion with the button recorded at press time
(mouse-movement events carry no button) and skips events that stay
within the same cell so the PTY is not flooded with redundant motion.

Key Bindings

ghostel--mouse-drag-map <mouse-movement>

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--mouse-drag-motion (event)
  "Forward mouse-movement EVENT as a motion event during a drag.
Bound in `ghostel--mouse-drag-map' while a drag is in progress.
Labels the motion with the button recorded at press time
\(`mouse-movement' events carry no button) and skips events that stay
within the same cell so the PTY is not flooded with redundant motion."
  (interactive "e")
  (when ghostel--mouse-drag-button
    (let* ((posn (event-start event))
           (col-row (ghostel--posn-cell posn))
           (col (car col-row))
           (row (cdr col-row)))
      (unless (equal (cons row col) ghostel--mouse-drag-last-cell)
        (setq ghostel--mouse-drag-last-cell (cons row col))
        (ghostel--mouse-event ghostel--term
                              2  ; motion
                              ghostel--mouse-drag-button
                              row col
                              (ghostel--mouse-mods event))))))