From b1cd16f7ff33d01963a1e04bde19a705036a0b64 Mon Sep 17 00:00:00 2001 From: Daneel Date: Tue, 24 Feb 2026 11:03:39 +0100 Subject: [PATCH] fix: re-activate evil-normal-state on pdf-view window focus --- config.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config.el b/config.el index 94fb09a..14ad115 100644 --- a/config.el +++ b/config.el @@ -1121,6 +1121,13 @@ Otherwise: runs interactive ement-connect, then opens rooms after sync." "a" #'pdf-annot-add-highlight-markup-annotation "q" #'quit-window)) +;; Re-activate Evil normal state when switching to a pdf-view window. +;; Without this, j/k do not respond after SPC w w until the user clicks. +(add-hook 'window-selection-change-functions + (lambda (_frame) + (when (derived-mode-p 'pdf-view-mode) + (evil-normal-state)))) + ;; Open PDFs from org export in Emacs (pdf-view-mode) instead of Preview (when (eq system-type 'darwin) (setq org-file-apps