protesilaos / dired-preview

Automatically preview file at point in Emacs Dired.
GNU General Public License v3.0
55 stars 2 forks source link

Split Width Threshold: Handle nil value #11

Closed juergenhoetzel closed 6 months ago

juergenhoetzel commented 6 months ago

Fixes

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  >=(238 nil)
  (and s (>= width split-width-threshold))
  (let* ((width (and t (window-body-width))) (s (and width (>= width (window-body-height)))) (s (and s (>= width split-width-threshold)))) (if s (list ':side 'right ':dimension 'window-width ':size (dired-preview-get-window-size :width)) (list ':side 'bottom ':dimension 'window-height ':size (dired-preview-get-window-size :height))))
  dired-preview-display-action-side()

I disabled horizontal splitting on my Emacs setup via

(custom-set-variables
 '(split-width-threshold nil))
protesilaos commented 6 months ago

Merged. Thank you!