From 5faaf45bf54c0cd3135b9c5a747c22797fe1d290 Mon Sep 17 00:00:00 2001 From: Matt Huszagh Date: Sun, 21 Nov 2021 10:30:30 -0800 Subject: [PATCH] org.el: Fix inline image width calculation when line numbers present * 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. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index eeefb4af3..331bd9f65 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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) -- 2.31.1