Optimize opening large files #1834
Fixes an issue where dtrt-indent and/or nav-flash would hang Emacs when opening large files, and disables all mode hooks for large files (without using fundamental-mode so you can at least get syntax highlighting).
This commit is contained in:
parent
2a943437a2
commit
616dec5b93
2 changed files with 42 additions and 4 deletions
|
@ -16,7 +16,8 @@ jumping to another part of the file)."
|
|||
(defun +nav-flash-blink-cursor-maybe (&rest _)
|
||||
"Like `+nav-flash-blink-cursor', but no-ops if in special-mode or term-mode,
|
||||
or triggered from one of `+nav-flash-exclude-commands'."
|
||||
(unless (or (derived-mode-p 'special-mode 'term-mode)
|
||||
(unless (or (bound-and-true-p so-long-enabled)
|
||||
(derived-mode-p 'special-mode 'term-mode)
|
||||
(memq this-command +nav-flash-exclude-commands)
|
||||
(and (equal (point-marker) (car +nav-flash--last-point))
|
||||
(equal (selected-window) (cdr +nav-flash--last-point))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue