Skip to content

Commit

Permalink
escape to normal from replace state
Browse files Browse the repository at this point in the history
While in replace state, escaping was having no effect. As it is
considered a foreign state, it attempts to only exit the mode, which
for evil-backed modes is a no-op. Additionally, as it isn't a lithium
mode, there isn't even a notion of a stack wherein exiting replace
mode would reinstate any prior mode. Escaping to normal seems the most
straightforward thing to do, but I'm not sure if there may be a more
correct handling.
  • Loading branch information
countvajhula committed Sep 18, 2024
1 parent 11d83db commit aed4bd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rigpa.el
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,11 @@
;; This will bypass any rigpa-specific behavior, but as it seems
;; unlikely that we'd want to incorporate operator state formally
;; as part of any structures, this seems a reasonable hack
(define-key evil-operator-state-map [escape] #'evil-force-normal-state))
(define-key evil-operator-state-map [escape] #'evil-force-normal-state)
;; same, I guess, for replace state? though, why are we even overriding
;; [esc] above to begin with? Should we not integrate built-in evil
;; states other than Normal?
(define-key evil-replace-state-map [escape] #'evil-force-normal-state))

(defun rigpa--register-modes ()
"Register the standard modes with the framework."
Expand Down

0 comments on commit aed4bd2

Please sign in to comment.