Commit 862f1c9c authored by Glenn Morris's avatar Glenn Morris
Browse files

* lisp/image-dired.el (image-dired-track-original-file):

Avoid changing point of wrong window.

Fixes: debbugs:14909
parent 188c1ae6
2013-07-20 Glenn Morris <rgm@gnu.org>
* image-dired.el (image-dired-track-original-file):
Avoid changing point of wrong window. (Bug#14909)
2013-07-18 Richard Copley <rcopley@gmail.com> (tiny change)
 
* progmodes/gdb-mi.el (gdb-done-or-error):
......
......@@ -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 ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment