From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34513: display-line-numbers in term mode Date: Tue, 22 Oct 2019 20:33:27 +0300 Message-ID: <83v9sgznvc.fsf@gnu.org> References: <8736fkaish.fsf@aol.com> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="261936"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34513@debbugs.gnu.org, monnier@iro.umontreal.ca To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 22 19:34:22 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMy2z-0015jj-Ii for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2019 19:34:17 +0200 Original-Received: from localhost ([::1]:38126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMy2s-0005yX-VO for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2019 13:34:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50516) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMy2l-0005wZ-4u for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 13:34:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMy2k-0000RB-7q for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 13:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMy2k-0000R7-4n for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 13:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMy2j-00010y-Ve for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 13:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Oct 2019 17:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34513 X-GNU-PR-Package: emacs Original-Received: via spool by 34513-submit@debbugs.gnu.org id=B34513.15717656183856 (code B ref 34513); Tue, 22 Oct 2019 17:34:01 +0000 Original-Received: (at 34513) by debbugs.gnu.org; 22 Oct 2019 17:33:38 +0000 Original-Received: from localhost ([127.0.0.1]:60425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMy2M-000108-CD for submit@debbugs.gnu.org; Tue, 22 Oct 2019 13:33:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMy2L-0000zw-0z for 34513@debbugs.gnu.org; Tue, 22 Oct 2019 13:33:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMy2F-0000Ah-8H; Tue, 22 Oct 2019 13:33:31 -0400 Original-Received: from [176.228.60.248] (port=1171 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iMy2E-0007zs-K2; Tue, 22 Oct 2019 13:33:31 -0400 In-reply-to: <8736fkaish.fsf@aol.com> (message from Ergus on Thu 01 Jan 1970 01:00:00 AM CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:169994 Archived-At: > From: Ergus > Cc: 34513@debbugs.gnu.org, monnier@iro.umontreal.ca > Date: Thu 01 Jan 1970 01:00:00 AM CET > > Window width changes are unrelated to line numbers, right? > > > > Is window-size-change-functions what you want? > > Yes they are unrelated, but the issue is the same... No, the issue is not the same. When a window is resized, it is completely redrawn, and as part of that the line numbers are recalculated and redisplayed. That's because line-number display is an inherent part of redisplay. > Actually on a windows resize the term-line width is not updated > either. So the new outputs after that assume the same window width. The > line-number-width is just another side of the same problem where the > line-width is not recalculated.. > > On window increase size the issue is not so annoying (it is not right, > but it works) but on window decrease size (or line-number-width > increase) it is worth because the lines adds a \ and break. > > So a right fix maybe should recalculate the line-width more dynamically > (for example when inserting RET in term mode) So is window-size-change-functions what you need to use to hook into the size changes?