Browse Source

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.
Matt Huszagh 3 years ago
parent
commit
cd3e138ee5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -16880,7 +16880,7 @@ buffer boundaries with possible narrowing."
                     (/ (or (and (bound-and-true-p visual-fill-column-mode)
                     (/ (or (and (bound-and-true-p visual-fill-column-mode)
                                 (or visual-fill-column-width auto-fill-function))
                                 (or visual-fill-column-width auto-fill-function))
                            (when auto-fill-function fill-column)
                            (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)))))
                        (float (window-total-width)))))
         width)))
         width)))
    ((numberp org-image-actual-width)
    ((numberp org-image-actual-width)