emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e8d80f1: Fix line width in M-x term on -nw with line numbers


From: Lars Ingebrigtsen
Subject: master e8d80f1: Fix line width in M-x term on -nw with line numbers
Date: Mon, 21 Sep 2020 10:10:21 -0400 (EDT)

branch: master
commit e8d80f1e14c8efe42d59cf856cf403ec48dfe70b
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix line width in M-x term on -nw with line numbers
    
    * lisp/window.el (window-max-chars-per-line): Make the line width
    more correct in the presence of display-line-numbers-mode (bug#34513).
---
 lisp/window.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/window.el b/lisp/window.el
index f1ee87a..72957d8 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2172,7 +2172,8 @@ the font."
   (with-selected-window (window-normalize-window window t)
     (let* ((window-width (window-body-width window t))
           (font-width (window-font-width window face))
-          (ncols (/ window-width font-width)))
+          (ncols (- (/ window-width font-width)
+                     (line-number-display-width 'columns))))
       (if (and (display-graphic-p)
               overflow-newline-into-fringe
                (not



reply via email to

[Prev in Thread] Current Thread [Next in Thread]