From: Lars Ingebrigtsen Date: Mon, 21 Sep 2020 14:10:13 +0000 (+0200) Subject: Fix line width in M-x term on -nw with line numbers X-Git-Tag: emacs-28.0.90~5961 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e8d80f1e14c8efe42d59cf856cf403ec48dfe70b;p=emacs.git 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). --- diff --git a/lisp/window.el b/lisp/window.el index f1ee87aad25..72957d846ae 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