fix(magit): only revert if buffer file exists
This commit is contained in:
parent
f178eb6f52
commit
6ceb1e0bbe
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ window that already exists in that direction. It will split otherwise."
|
|||
(defun +magit--revert-buffer (buffer)
|
||||
(with-current-buffer buffer
|
||||
(kill-local-variable '+magit--stale-p)
|
||||
(when buffer-file-name
|
||||
(when (and buffer-file-name (file-exists-p buffer-file-name))
|
||||
(if (buffer-modified-p (current-buffer))
|
||||
(when (bound-and-true-p vc-mode)
|
||||
(vc-refresh-state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue