Explorar el Código

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.
TEC hace 4 años
padre
commit
55cf527375
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -16679,7 +16679,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))
+                           (- (window-text-width) display-line-numbers-width))
                        (float (window-total-width)))))
                        (float (window-total-width)))))
         width)))
         width)))
    ((numberp org-image-actual-width)
    ((numberp org-image-actual-width)