Get rid of window-switch hook (defective)
This commit is contained in:
parent
70b0bdad2a
commit
2e4a083bbb
|
@ -74,11 +74,6 @@
|
||||||
))
|
))
|
||||||
(evil-set-initial-state `,(car mode-map) `,(cdr mode-map)))
|
(evil-set-initial-state `,(car mode-map) `,(cdr mode-map)))
|
||||||
|
|
||||||
;; Switch to normal mode before switching windows
|
|
||||||
(defun narf|evil-back-to-normal (&rest _)
|
|
||||||
(when (eq evil-state 'insert) (evil-normal-state)))
|
|
||||||
(add-hook! narf.window-switch 'narf|evil-back-to-normal)
|
|
||||||
|
|
||||||
(progn ; evil hacks
|
(progn ; evil hacks
|
||||||
(defadvice evil-force-normal-state (after evil-esc-quit activate)
|
(defadvice evil-force-normal-state (after evil-esc-quit activate)
|
||||||
"Close popups, disable search highlights and quit the minibuffer if open."
|
"Close popups, disable search highlights and quit the minibuffer if open."
|
||||||
|
|
11
core/core.el
11
core/core.el
|
@ -129,17 +129,6 @@
|
||||||
async-wait
|
async-wait
|
||||||
async-inject-variables))
|
async-inject-variables))
|
||||||
|
|
||||||
;; Custom Hooks ;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
(defvar narf.window-switch-hook '()
|
|
||||||
"Hooks run before switching windows. Hooks take two arguments (one is
|
|
||||||
optional): WINDOW and NORECORD. WINDOW is the window being switched to. Use
|
|
||||||
`current-buffer' to get the buffer being switched from. See `select-window' for
|
|
||||||
details on NORECORD.")
|
|
||||||
(defun narf*run-window-switch-hooks (window &optional norecord)
|
|
||||||
(run-hook-with-args 'narf.window-switch-hook window norecord))
|
|
||||||
(advice-add 'select-window :before 'narf*run-window-switch-hooks)
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defun narf-init ()
|
(defun narf-init ()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user