summaryrefslogtreecommitdiff
path: root/lisp/image-dired.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-07-20 12:17:32 -0700
committerGlenn Morris <rgm@gnu.org>2013-07-20 12:17:32 -0700
commit862f1c9c3a172cd704e286964705b06aaf68b7fa (patch)
tree86d70d813758d39cb10749cae53c9d4de6dc7c6d /lisp/image-dired.el
parent188c1ae6034a4775eb0c3e7f65714f9b90efa8a7 (diff)
downloademacs-862f1c9c3a172cd704e286964705b06aaf68b7fa.tar.gz
* lisp/image-dired.el (image-dired-track-original-file):
Avoid changing point of wrong window. Fixes: debbugs:14909
Diffstat (limited to 'lisp/image-dired.el')
-rw-r--r--lisp/image-dired.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index f0483e6217a..d101fc63da0 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -1035,15 +1035,15 @@ With prefix argument ARG, remove tag from file at point."
See documentation for `image-dired-toggle-movement-tracking'.
Interactive use only useful if `image-dired-track-movement' is nil."
(interactive)
- (let ((old-buf (current-buffer))
+ (let* ((old-buf (current-buffer))
(dired-buf (image-dired-associated-dired-buffer))
- (file-name (image-dired-original-file-name)))
+ (file-name (image-dired-original-file-name))
+ (window (image-dired-get-buffer-window dired-buf)))
(when (and (buffer-live-p dired-buf) file-name)
(set-buffer dired-buf)
(if (not (dired-goto-file file-name))
(message "Could not track file")
- (set-window-point
- (image-dired-get-buffer-window dired-buf) (point)))
+ (if window (set-window-point window (point))))
(set-buffer old-buf))))
(defun image-dired-toggle-movement-tracking ()