summaryrefslogtreecommitdiff
path: root/lisp/image-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/image-mode.el')
-rw-r--r--lisp/image-mode.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index b5cfe57ed18..fc38f045ff9 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -97,11 +97,11 @@ A winprops object has the shape (WINDOW . ALIST)."
;; When set-window-buffer, set hscroll and vscroll to what they were
;; last time the image was displayed in this window.
(when (listp image-mode-winprops-alist)
- (let* ((winprops (image-mode-winprops win))
+ (let* ((winprops (image-mode-winprops))
(hscroll (image-mode-window-get 'hscroll winprops))
(vscroll (image-mode-window-get 'vscroll winprops)))
- (if hscroll (set-window-hscroll win hscroll))
- (if vscroll (set-window-vscroll win vscroll)))))
+ (if hscroll (set-window-hscroll (selected-window) hscroll))
+ (if vscroll (set-window-vscroll (selected-window) vscroll)))))
(defun image-mode-setup-winprops ()
;; Record current scroll settings.