mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
Handle relative file names in vc-resynch-window and vc-resynch-buffer
* lisp/vc/vc-dispatcher.el (vc-resynch-window, vc-resynch-buffer): While comparing with `buffer-file-name' if `file' is not absolute use `expand-file-name' in `vc-root-dir'. This fixes the case of refreshing the buffers after typing `C-x v = C-x v u' (bug#60897).
This commit is contained in:
parent
695e9f71c3
commit
ecf500b5e3
@ -608,7 +608,10 @@ reverting. NOQUERY should be t *only* if it is known the only
|
||||
difference between the buffer and the file is due to
|
||||
modifications by the dispatcher client code, rather than user
|
||||
editing!"
|
||||
(and (string= buffer-file-name file)
|
||||
(and (string= buffer-file-name
|
||||
(if (file-name-absolute-p file)
|
||||
file
|
||||
(expand-file-name file (vc-root-dir))))
|
||||
(if keep
|
||||
(when (file-exists-p file)
|
||||
(when reset-vc-info
|
||||
@ -643,7 +646,10 @@ editing!"
|
||||
|
||||
(defun vc-resynch-buffer (file &optional keep noquery reset-vc-info)
|
||||
"If FILE is currently visited, resynch its buffer."
|
||||
(if (string= buffer-file-name file)
|
||||
(if (string= buffer-file-name
|
||||
(if (file-name-absolute-p file)
|
||||
file
|
||||
(expand-file-name file (vc-root-dir))))
|
||||
(vc-resynch-window file keep noquery reset-vc-info)
|
||||
(if (file-directory-p file)
|
||||
(vc-resynch-buffers-in-directory file keep noquery reset-vc-info)
|
||||
|
Loading…
Reference in New Issue
Block a user