branch: master
commit 3499a32c2f9f7b1e4b989c0e9513df04a5741002
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Only rename buffers on rename operation (#56).
---
dired-async.el | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dired-async.el b/dired-async.el
index 6827b0f..01d1a8f 100644
--- a/dired-async.el
+++ b/dired-async.el
@@ -219,10 +219,11 @@ ESC or `q' to not overwrite any of the remaining files,
(setq callback
`(lambda (&optional ignore)
(dired-async-after-file-create ,(length fn-list))
- (cl-loop for (file . to) in ',async-fn-list
- do (and (get-file-buffer file)
- (with-current-buffer (get-file-buffer file)
- (set-visited-file-name to nil t)))))))
+ (when (string= ,operation "rename")
+ (cl-loop for (file . to) in ',async-fn-list
+ do (and (get-file-buffer file)
+ (with-current-buffer (get-file-buffer file)
+ (set-visited-file-name to nil t))))))))
;; Handle error happening in host emacs.
(cond
(dired-create-files-failures