refactor(lib): doom-region-end: extract marker

This commit is contained in:
Henrik Lissner 2024-03-11 03:26:01 -04:00
parent 61327bf777
commit 559171575e
No known key found for this signature in database
GPG Key ID: B60957CA074D39A3

View File

@ -88,10 +88,11 @@ Uses `evil-visual-beginning' if available."
"Return end position of selection.
Uses `evil-visual-end' if available."
(declare (side-effect-free t))
(if (and (bound-and-true-p evil-local-mode)
(evil-visual-state-p))
evil-visual-end
(region-end)))
(or (and (bound-and-true-p evil-local-mode)
(evil-visual-state-p)
(markerp evil-visual-end)
(marker-position evil-visual-end))
(region-end)))
;;;###autoload
(defun doom-thing-at-point-or-region (&optional thing prompt)