File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ Kills all pre-edit buffers that were created to store original file content."
159
159
Creates temporary buffers containing the original content of all tracked files.
160
160
This is skipped if `aidermacs-show-diff-after-change' is nil."
161
161
(when aidermacs-show-diff-after-change
162
+ (aidermacs--cleanup-temp-buffers)
162
163
(when-let* ((files aidermacs--tracked-files))
163
164
(let ((attempts 0 )
164
165
(max-attempts 3 ))
@@ -434,15 +435,20 @@ This is skipped if `aidermacs-show-diff-after-change' is nil."
434
435
(font-lock-mode 1 )
435
436
(setq buffer-read-only t ))
436
437
437
- (define-key aidermacs-file-diff-selection-mode-map (kbd " q" )
438
- (lambda ()
439
- (interactive )
440
- (kill-buffer )
441
- (aidermacs--cleanup-temp-buffers)))
438
+ (defun aidermacs--file-diff-selection-quit ()
439
+ " Quit file selection"
440
+ (interactive )
441
+ (kill-buffer )
442
+ (aidermacs--cleanup-temp-buffers))
443
+
444
+ (define-key aidermacs-file-diff-selection-mode-map (kbd " q" ) 'aidermacs--file-diff-selection-quit )
442
445
443
446
(defun aidermacs--show-file-selection-buffer (files )
444
447
" Display a buffer with a list of FILES that were edited.
445
448
User can select a file to view its diff."
449
+ (when-let (buf (get-buffer " *aidermacs-edited-files*" ))
450
+ (kill-buffer buf))
451
+
446
452
(let ((buf (get-buffer-create " *aidermacs-edited-files*" ))
447
453
(pre-edit-file-buffers aidermacs--pre-edit-file-buffers))
448
454
(with-current-buffer buf
You can’t perform that action at this time.
0 commit comments