Subject: bug#34513: display-line-numbers in term mode

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 20 Sep 2020 20:30:33 +0200

Stefan Monnier <[email-masked]> writes:

> So maybe a simple fix is the patch below, but I'm not sure it's always
> the right thing to do (and the width won't be automatically updated when
> the (line-number-display-width) changes).

[...]

> -	   (ncols (/ window-width font-width)))
> +	   (ncols (- (/ window-width font-width) (line-number-display-width))))

I tried this patch in Emacs 28, and it didn't seem to help much.

To test

emacs -Q
M-x global-display-line-numbers-mode RET
M-x term RET RET
emacs -Q -nw

Note wrapped mode line of the inner Emacs.

(This works fine if display-line-numbers-mode is not on.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no