fix(evil): q/Q keybinds in view-mode

Caused by evil-collection-view binding q to quit-window, which breaks
view-exit-action. This should be reported upstream.
This commit is contained in:
Henrik Lissner 2024-07-10 01:16:29 -04:00
parent fe0548e820
commit 9d7885abbf
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -359,4 +359,13 @@ and complains if a module is loaded too early (during startup)."
(dolist (mode evil-collection-mode-list)
(dolist (req (or (cdr-safe mode) (list mode)))
(with-eval-after-load req
(+evil-collection-init mode +evil-collection-disabled-list))))))
(+evil-collection-init mode +evil-collection-disabled-list)))))
;; HACK: The Diff options in `save-some-buffers's prompt should persist after
;; you quit view-mode, but evil-collection-view's bindings on q/Q break
;; this, so these are here to restore them.
;; REVIEW: PR this upstream!
(map! :after (view evil-collection-view)
:map view-mode-map
:n "q" #'View-quit
:n "Q" #'View-quit-all))