]> git.eshelyaron.com Git - emacs.git/commitdiff
Display window before calculating width
authorMark Oteiza <mvoteiza@udel.edu>
Fri, 2 Dec 2016 21:53:02 +0000 (16:53 -0500)
committerMark Oteiza <mvoteiza@udel.edu>
Sat, 3 Dec 2016 05:58:26 +0000 (00:58 -0500)
* lisp/image-dired.el (image-dired-display-thumbs): Display the buffer
before calling image-dired-line-up and friends, which in turn calculate
the window width. Otherwise, the thumbnail layout will be wrong in
a side-by-side split.

lisp/image-dired.el

index 714182ae25fad810e95363d19762127cb4c4bcbc..67fbc029236a7fa75860f0be43615b39084c52f6 100644 (file)
@@ -854,6 +854,9 @@ thumbnail buffer to be selected."
                (message "Thumb could not be created for file %s" curr-file)
              (image-dired-insert-thumbnail thumb-name curr-file dired-buf)))
          files))
+      (if do-not-pop
+          (display-buffer buf)
+        (pop-to-buffer buf))
       (cond ((eq 'dynamic image-dired-line-up-method)
              (image-dired-line-up-dynamic))
             ((eq 'fixed image-dired-line-up-method)
@@ -863,10 +866,7 @@ thumbnail buffer to be selected."
             ((eq 'none image-dired-line-up-method)
              nil)
             (t
-             (image-dired-line-up-dynamic))))
-    (if do-not-pop
-        (display-buffer image-dired-thumbnail-buffer)
-      (pop-to-buffer image-dired-thumbnail-buffer))))
+             (image-dired-line-up-dynamic))))))
 
 ;;;###autoload
 (defun image-dired-show-all-from-dir (dir)