From 55cf527375081092fe497535f24c57bda8e4d22b Mon Sep 17 00:00:00 2001 From: TEC Date: Wed, 29 Sep 2021 21:38:50 +0800 Subject: [PATCH] org: Image display, account for line number width * lisp/org.el (org-display-inline-image--width): To be slightly more accurate when calculating image widths that are proportional to the text width in the current buffer, subtract the width taken up by line numbers. --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 2ec6566c0..405f0f0f9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16679,7 +16679,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)) + (- (window-text-width) display-line-numbers-width)) (float (window-total-width))))) width))) ((numberp org-image-actual-width)