Subject: bug#18484: also affected

From: Tamas Papp <[email-masked]>
Date: Sun, 14 Jan 2018 15:28:23 +0100

This bug appears to be still alive in 25.2.2, and I am also affected.

It is easy to reproduce with various command-line tools that allow line
editing that wrap lines and work perfectly fine in a terminal emulator,
eg sh, bc and I ran into this with Julia v0.6.2, here is an asciinema
terminal capture:

https://asciinema.org/a/7QeLiQh9xQkrF8zwTkzAD9Zrr

I know next to nothing about terminals, but with

(defun ansi-term-debug-message (proc char)
  (message "ANSI escape in process %s char %c, param %d, remaining params %d"
           proc char term-terminal-parameter term-terminal-more-parameters))

(advice-add 'term-handle-ansi-escape :before 'ansi-term-debug-message)

managed to narrow it down to the handling of the EL ( \e[0K ), or
possibly CUF and CUU, ( \e[1A , \e[1C ) when TERM-SUPPRESS-HARD-NEWLINE
is T.