aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2020-09-21 16:10:13 +0200
committerLars Ingebrigtsen2020-09-21 16:10:13 +0200
commite8d80f1e14c8efe42d59cf856cf403ec48dfe70b (patch)
tree0c3893bae74eb4d3a75478a25d18372c04364ee5
parentd2b754ec1a947a4d98fa6521ad9263bdc45900e5 (diff)
downloademacs-e8d80f1e14c8efe42d59cf856cf403ec48dfe70b.tar.gz
emacs-e8d80f1e14c8efe42d59cf856cf403ec48dfe70b.zip
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).
-rw-r--r--lisp/window.el3
1 files changed, 2 insertions, 1 deletions
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."
2172 (with-selected-window (window-normalize-window window t) 2172 (with-selected-window (window-normalize-window window t)
2173 (let* ((window-width (window-body-width window t)) 2173 (let* ((window-width (window-body-width window t))
2174 (font-width (window-font-width window face)) 2174 (font-width (window-font-width window face))
2175 (ncols (/ window-width font-width))) 2175 (ncols (- (/ window-width font-width)
2176 (line-number-display-width 'columns))))
2176 (if (and (display-graphic-p) 2177 (if (and (display-graphic-p)
2177 overflow-newline-into-fringe 2178 overflow-newline-into-fringe
2178 (not 2179 (not