ui/nav-flash: improve conditional blinking on jump

Sometimes it wouldn't blink when the motion occurred within the same
window. This ensures more consistency.
This commit is contained in:
Henrik Lissner 2019-05-21 17:21:14 -04:00
parent efb06ee42f
commit 9f45197a0b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -18,9 +18,10 @@ jumping to another part of the file)."
or triggered from one of `+nav-flash-exclude-commands'."
(unless (or (derived-mode-p 'special-mode 'term-mode)
(memq this-command +nav-flash-exclude-commands)
(equal (point-marker) +nav-flash--last-point))
(and (equal (point-marker) (car +nav-flash--last-point))
(equal (selected-window) (cdr +nav-flash--last-point))))
(+nav-flash-blink-cursor)
(setq +nav-flash--last-point (point-marker))))
(setq +nav-flash--last-point (cons (point-marker) (selected-window)))))
;;;###autoload
(defun +nav-flash|delayed-blink-cursor (&rest _)