From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.bugs Subject: bug#34513: display-line-numbers in term mode Date: Sun, 17 Feb 2019 15:19:40 +0100 Message-ID: <20190217141940.62v754v46qwfcs2i@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="215922"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 To: 34513@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 17 15:21:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvNJf-000tzn-VA for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Feb 2019 15:21:12 +0100 Original-Received: from localhost ([127.0.0.1]:42356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvNJe-00042k-Oi for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Feb 2019 09:21:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvNJX-00042e-HP for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 09:21:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvNJW-0005a1-PF for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 09:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51557) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvNJW-0005Zr-KE for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 09:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gvNJW-0001OO-Dv for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 09:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Feb 2019 14:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34513 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15504132075256 (code B ref -1); Sun, 17 Feb 2019 14:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Feb 2019 14:20:07 +0000 Original-Received: from localhost ([127.0.0.1]:50838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvNId-0001Mi-EI for submit@debbugs.gnu.org; Sun, 17 Feb 2019 09:20:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvNIY-0001M5-U3 for submit@debbugs.gnu.org; Sun, 17 Feb 2019 09:20:05 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39310) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gvNIS-00054l-IN for submit@debbugs.gnu.org; Sun, 17 Feb 2019 09:19:57 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvNIR-0003pO-Nx for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 09:19:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvNIP-00053R-Fa for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 09:19:55 -0500 Original-Received: from sonic314-19.consmr.mail.ir2.yahoo.com ([77.238.177.145]:38544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvNIL-00051R-Jq for bug-gnu-emacs@gnu.org; Sun, 17 Feb 2019 09:19:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1550413186; bh=CBaTQO3MjWCUoilI39BlrgEP6455+toRSQts6MZ+PcQ=; h=Date:From:To:Subject:From:Subject; b=VovIIk9OgdtzrqyejRq2kkpOvrGUabxR8U/TEgKZ74KjJKRcMqy1kZrKSNzemlKkaaQDyAScewWvY+s5Nsxk9JsWsqQZ3U4X57IEkm+PxQRLYtTrisuP+KW00sazDzrNpYg4VirqF4yk2I0E4RoF4vCdGevTA2DSD3+g+wsfKpiyOmXQ1pNatwSDsVaJKTvNBwRADDc9aRLjjiqhmnGI3AyJdBsINpg7CaIKbP3ZG59d2i7kTMUxj9z60ugsVGLBFVOIHpY5inKdwt2Xur4YxUnrLKrN52sRTRHwPcczYB2tbR+QZQLcyo5Ix64eK8cMfZwdFrGaQg9n2JuQB+3chw== X-YMail-OSG: 7AA_3SsVM1m2rB5yrAxLRTAB1u9y2La7iyJ9CqT_4AQqU9Z430TFOoNicIcRll. jkeXTDRZxMVZC5tCSb8lD_Gzi7gDk1tzSXRscp9tQ9JzPzG91.jYM71MF0EzGILERMC.gxo0mCuH buq_U3Z4DNJ2ye9OMt7Vnt8a7Uxjc_AZCuu2Rjs7OsvLswojgOcNHpoYhgfzzk4CUF0ZRjIq2uKp oS.28JAul3Pkg3EAtXvPaGP4A3YbUJMulywnEft_OdwXBssSUUwWhx.qxcO7nXA48ytdDxIt1z1B R_is65QWa2bwOD1jRY0_IxTbVidtkujsYiRuE8eq44dSVoWgrHvQCfX.J6Jf600ITM1N_pV_31_s 3_9EXbZ8xTVJCFtbmmPgatHahKGyjofY6.NiGCMYYE1fXABPgoNlgP1_89FI1Vc._wMelGa.UU0j EeI_9OdUP28iKLBXs6kh60hJs2KeLwwQoCTyIjxR9tXvHu_5_yLrx3K0UYgY0jAUVvRzCtbWEvRL gtAVuutUJtX1OIc53mLVUWjo8QRLbisv0YI8sNLUJUkg4ohYjpIbgyMhvGRmO0Vg2VTJbztxz3yv 3C7W2JHzURr_TsNStSv9ScJHVWiUKsGxdQeH21Qr6u..BIrq2jwTlWLxyJIYDIEyJ.8lNDCezlZh P4enDFHZaf8MCpHsN9Q3bxy6jhxcHhu4pCApdVN1LeNmy2Z21mqd2C6Xu0w15hzOGqpSVDar7Mn9 o0JAG4L4uioxGQx5drhulhApcOEG6IaD.A5o3miMzScTLADW7u7TtwgyVfgDFH1E.Pw0ku2MqNgu FgLJ1DZnhWDA1uPzT6f3xcDujKz9AxbpqAF7pSQrWq Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Sun, 17 Feb 2019 14:19:46 +0000 Original-Received: from 2.152.205.184.dyn.user.ono.com (EHLO Ergus) ([2.152.205.184]) by smtp419.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 226744643baa417e851f03f3b49faedf for ; Sun, 17 Feb 2019 14:19:43 +0000 (UTC) Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155465 Archived-At: 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