aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Oteiza2016-12-02 16:53:02 -0500
committerMark Oteiza2016-12-03 00:58:26 -0500
commit143a4306759a91e84b486a9e4c52f83d96d8d23d (patch)
treea686fba28b8dd39a20b85bb2c9068d71492ff105
parent5e915691ff097668b60c715cd39ab87975fc3000 (diff)
downloademacs-143a4306759a91e84b486a9e4c52f83d96d8d23d.tar.gz
emacs-143a4306759a91e84b486a9e4c52f83d96d8d23d.zip
Display window before calculating width
* 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.
-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 714182ae25f..67fbc029236 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -854,6 +854,9 @@ thumbnail buffer to be selected."
854 (message "Thumb could not be created for file %s" curr-file) 854 (message "Thumb could not be created for file %s" curr-file)
855 (image-dired-insert-thumbnail thumb-name curr-file dired-buf))) 855 (image-dired-insert-thumbnail thumb-name curr-file dired-buf)))
856 files)) 856 files))
857 (if do-not-pop
858 (display-buffer buf)
859 (pop-to-buffer buf))
857 (cond ((eq 'dynamic image-dired-line-up-method) 860 (cond ((eq 'dynamic image-dired-line-up-method)
858 (image-dired-line-up-dynamic)) 861 (image-dired-line-up-dynamic))
859 ((eq 'fixed image-dired-line-up-method) 862 ((eq 'fixed image-dired-line-up-method)
@@ -863,10 +866,7 @@ thumbnail buffer to be selected."
863 ((eq 'none image-dired-line-up-method) 866 ((eq 'none image-dired-line-up-method)
864 nil) 867 nil)
865 (t 868 (t
866 (image-dired-line-up-dynamic)))) 869 (image-dired-line-up-dynamic))))))
867 (if do-not-pop
868 (display-buffer image-dired-thumbnail-buffer)
869 (pop-to-buffer image-dired-thumbnail-buffer))))
870 870
871;;;###autoload 871;;;###autoload
872(defun image-dired-show-all-from-dir (dir) 872(defun image-dired-show-all-from-dir (dir)