GNU bug report logs - #34513
display-line-numbers in term mode

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Sun, 17 Feb 2019 14:21:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ergus <spacibba <at> aol.com>
To: 34513 <at> debbugs.gnu.org
Subject: bug#34513: display-line-numbers in term mode
Date: Sun, 17 Feb 2019 15:19:40 +0100
display-line-number-mode produces bad term buffers with extra breaks.

When using global-display-line-numbers there are some issues in term
mode because of the extra columns needed by the numbers.

The lines are broken because "tput cols" and $COLUMNS report the total
width of the window, but it does not take into account the 3/4 (or more)
chars taken by the line number. So longer lines need to be broken to fit.

The problem is worst when trying to use for example mocp or similar
curses bases applications. Or in zsh that uses an alternative to
readline to select with tabs.

A workaround is be to disable the numbers in term-mode with a hook (this
hides the problem). But a proper fix (maybe) could be to inform properly the
number of columns to the terminal process.

To reproduce this issue just:
1) open emacs, 
2) enable display-line-numbers-mode
3) M-x term. 

Any curses based program there should expose the issue easily.

I tried with emacs 26.1 and the master branch too.

Regards




This bug report was last modified 4 years and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.