diff: Only switch mode with read-only when in diff-mode
This commit is contained in:
parent
6bfd13f50f
commit
6a30d6b2ad
|
@ -42,10 +42,10 @@
|
|||
|
||||
(defun evil-collection-diff-read-only-state-switch ()
|
||||
"Make read-only in motion state, writable in normal state."
|
||||
(if buffer-read-only
|
||||
(progn
|
||||
(evil-motion-state))
|
||||
(evil-normal-state)))
|
||||
(when (eq major-mode 'diff-mode)
|
||||
(if buffer-read-only
|
||||
(evil-motion-state)
|
||||
(evil-normal-state))))
|
||||
|
||||
(defun evil-collection-diff-toggle-setup ()
|
||||
"Toggle visiting diff buffers in motion state."
|
||||
|
|
Loading…
Reference in New Issue