org.el: Improve inline image width calculation

* lisp/org.el (org-display-inline-image--width): When
display-line-numbers-width is nil, the width is computed dynamically.
This does not mean that the line number width is necessarily 0.
This commit is contained in:
Matt Huszagh 2021-11-21 10:41:22 -08:00 committed by TEC
parent 54da1d6d7b
commit cd3e138ee5
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 1 additions and 1 deletions

View File

@ -16880,7 +16880,7 @@ buffer boundaries with possible narrowing."
(/ (or (and (bound-and-true-p visual-fill-column-mode)
(or visual-fill-column-width auto-fill-function))
(when auto-fill-function fill-column)
(- (window-text-width) (or display-line-numbers-width 0)))
(- (window-text-width) (line-number-display-width)))
(float (window-total-width)))))
width)))
((numberp org-image-actual-width)