GNU bug report logs - #48399
27.2; term-mode: After splitting window, newlines are inserted

Previous Next

Package: emacs;

Reported by: Khoa Vo <vodangkhoa873 <at> gmail.com>

Date: Thu, 13 May 2021 14:53:01 UTC

Severity: normal

Found in version 27.2

Full log


Message #43 received at 48399 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> suse.de>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 Robert Pluim <rpluim <at> gmail.com>, Khoa Vo <vodangkhoa873 <at> gmail.com>,
 48399 <at> debbugs.gnu.org
Subject: Re: bug#48399: 27.2; term-mode: After splitting window, newlines
 are inserted
Date: Wed, 13 Jul 2022 00:21:14 +0200
Andreas Schwab <schwab <at> suse.de> writes:

> You can reproduce that by just printing "\e[K" to the terminal, which is
> handled by term-erase-in-line.

Thanks.  I can confirm that the newline is added by
term-erase-in-line -- the following makes the problem go away:

diff --git a/lisp/term.el b/lisp/term.el
index a28d8c5d76..3a9d41ffc1 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -3979,7 +3979,7 @@ term-erase-in-line
       ;; extra space when wrapped is false.
       (when wrapped
 	(insert ? ))
-      (insert ?\n)
+      ;;(insert ?\n)
       (put-text-property saved-point (point) 'font-lock-face 'default)
       (goto-char saved-point))))
 

But is obviously not the right thing...  But I guess it could be the
right thing if we only skip the newline insertion if we're at the
prompt?  (I don't know how to determine that, though.)

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




This bug report was last modified 2 years and 362 days ago.

Previous Next


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