mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
ui/nav-flash: fix wrong-type-argument error on recenter
This commit is contained in:
@ -1,19 +1,19 @@
|
||||
;;; ui/nav-flash/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +doom*blink-cursor-maybe (orig-fn &rest args)
|
||||
(defun +nav-flash*blink-cursor-maybe (orig-fn &rest args)
|
||||
"Blink current line if the window has moved."
|
||||
(let ((point (save-excursion (goto-char (window-start))
|
||||
(point-marker))))
|
||||
(apply orig-fn args)
|
||||
(unless (or (derived-mode-p 'term-mode)
|
||||
(equal point
|
||||
(save-excursion (goto-char (window-start))
|
||||
(point-marker))))
|
||||
(+doom/blink-cursor))))
|
||||
(if (or (not (window-start))
|
||||
(derived-mode-p 'term-mode))
|
||||
(apply orig-fn args)
|
||||
(let* ((win-beg (window-start))
|
||||
(point (save-excursion (goto-char win-beg) (point-marker))))
|
||||
(apply orig-fn args)
|
||||
(unless (equal point (save-excursion (goto-char win-beg) (point-marker)))
|
||||
(+nav-flash/blink-cursor)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +doom/blink-cursor (&rest _)
|
||||
(defun +nav-flash/blink-cursor (&rest _)
|
||||
"Blink current line using `nav-flash'."
|
||||
(interactive)
|
||||
(unless (minibufferp)
|
||||
|
Reference in New Issue
Block a user