all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Andreas Schwab <schwab@suse.de>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	Robert Pluim <rpluim@gmail.com>,
	Khoa Vo <vodangkhoa873@gmail.com>,
	48399@debbugs.gnu.org
Subject: bug#48399: 27.2; term-mode: After splitting window, newlines are inserted
Date: Wed, 13 Jul 2022 00:21:14 +0200	[thread overview]
Message-ID: <87k08iug4l.fsf@gnus.org> (raw)
In-Reply-To: <mvmo7xujtkx.fsf@suse.de> (Andreas Schwab's message of "Tue, 12 Jul 2022 16:26:06 +0200")

Andreas Schwab <schwab@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





      reply	other threads:[~2022-07-12 22:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  9:14 bug#48399: 27.2; term-mode: After splitting window, newlines are inserted Khoa Vo
2022-07-11 14:42 ` Lars Ingebrigtsen
2022-07-11 14:57   ` Robert Pluim
2022-07-11 15:48     ` Michael Heerdegen
2022-07-12 12:28       ` Lars Ingebrigtsen
2022-07-12 13:13         ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-12 13:27           ` Michael Heerdegen
2022-07-12 13:48           ` Andreas Schwab
2022-07-12 13:40         ` Eli Zaretskii
2022-07-12 14:14         ` Andreas Schwab
2022-07-12 14:26         ` Andreas Schwab
2022-07-12 22:21           ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k08iug4l.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=48399@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=rpluim@gmail.com \
    --cc=schwab@suse.de \
    --cc=vodangkhoa873@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.