]> git.eshelyaron.com Git - emacs.git/commit
Reset window scroll when displaying an image
authorMark Oteiza <mvoteiza@udel.edu>
Wed, 14 Dec 2016 17:25:04 +0000 (12:25 -0500)
committerMark Oteiza <mvoteiza@udel.edu>
Wed, 14 Dec 2016 17:25:04 +0000 (12:25 -0500)
commit44a77d34c63fb4188edca6e1a875c9a1ec01f3f7
tree039915a51d8be97a06153508da1dac98defe7e60
parent51b2669ad51441b3bd318c749e67b267defe4882
Reset window scroll when displaying an image

When viewing a large image full size and scrolling, for instance, to
the lower right corner, then selecting a much smaller image in the
thumbnail buffer, the window stays scrolled so the new image is out of
the window.  One must scroll back to the "origin" to view the new
displayed image, or just kill the image-dired-display-image buffer and
try again.  This fixes the issue.
* lisp/image-dired.el (image-dired-display-window-width):
(image-dired-display-window-height): Operate on a window as argument.
(image-dired-display-image): Bind (image-dired-display-window) and use
it. Set window vscroll and hscroll to zero when refreshing the
buffer's contents.
lisp/image-dired.el