ui/nav-flash: factor out redundancy
This commit is contained in:
parent
633fd7c95f
commit
a93f097f78
2 changed files with 3 additions and 4 deletions
|
@ -16,11 +16,10 @@ jumping to another part of the file)."
|
||||||
(defun +nav-flash-blink-cursor-maybe (&rest _)
|
(defun +nav-flash-blink-cursor-maybe (&rest _)
|
||||||
"Like `+nav-flash-blink-cursor', but no-ops if in special-mode or term-mode,
|
"Like `+nav-flash-blink-cursor', but no-ops if in special-mode or term-mode,
|
||||||
or triggered from one of `+nav-flash-exclude-commands'."
|
or triggered from one of `+nav-flash-exclude-commands'."
|
||||||
(unless (or (memq this-command '(mouse-drag-region evil-mouse-drag-region))
|
(unless (or (memq this-command +nav-flash-exclude-commands)
|
||||||
(bound-and-true-p so-long-minor-mode)
|
(bound-and-true-p so-long-minor-mode)
|
||||||
(eq major-mode 'so-long-mode)
|
(eq major-mode 'so-long-mode)
|
||||||
(derived-mode-p 'special-mode 'term-mode)
|
(derived-mode-p 'special-mode 'term-mode)
|
||||||
(memq this-command +nav-flash-exclude-commands)
|
|
||||||
(and (equal (point-marker) (car +nav-flash--last-point))
|
(and (equal (point-marker) (car +nav-flash--last-point))
|
||||||
(equal (selected-window) (cdr +nav-flash--last-point))))
|
(equal (selected-window) (cdr +nav-flash--last-point))))
|
||||||
(+nav-flash-blink-cursor)
|
(+nav-flash-blink-cursor)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
;;; ui/nav-flash/config.el -*- lexical-binding: t; -*-
|
;;; ui/nav-flash/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
(defvar +nav-flash-exclude-commands
|
(defvar +nav-flash-exclude-commands
|
||||||
'(mouse-set-point evil-mouse-drag-region
|
'(mouse-set-point mouse-drag-region evil-mouse-drag-region +org/dwim-at-point
|
||||||
+org/dwim-at-point org-find-file org-find-file-at-mouse)
|
org-find-file org-find-file-at-mouse)
|
||||||
"A list of commands that should not trigger nav-flash.")
|
"A list of commands that should not trigger nav-flash.")
|
||||||
|
|
||||||
(use-package! nav-flash
|
(use-package! nav-flash
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue