Hello, This is a very small patch that I believe fixes a previous, incorrect fix for computing the window text area when line numbers are present. The previous fix seemed to assume that display-line-numbers-width being nil meant that this means line numbers are not present. However, it can also mean (as described in the variable documentation) that the line number width is computed dynamically.
Thanks Matt
>From 5faaf45bf54c0cd3135b9c5a747c22797fe1d290 Mon Sep 17 00:00:00 2001 From: Matt Huszagh <huszaghm...@gmail.com> 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