Subject: bug#78474: 31.0.50; Wrong char insertion in rxvt

From: Bastien Guerry <[email-masked]>
Date: Sun, 18 May 2025 10:54:50 +0200

Samuel Thibault <[email-masked]> writes:

> "Emacs, instead of sending a rightward cursor movement
> (\e[C), sends \009\008 (a tabulation and a leftward cursor movement)"

I'd describe it as the result of the "optimization" rather than the
optimization itself...

Line 90 of cm.c, there is this if clause that leads to a comment:

	if (tty->Wcm->cm_magicwrap)
	    ;			/* "limbo" */

I guess rxvt and vte implement a variant of magicwrap that is not
handled by addcol, which leaves the cursor in "limbo" state.

Maybe Samuel you can give details on how rxvt vte handle auto/magic
wrapping and, perhaps, how addcol should be fixed?

I don't see any interaction between addcol and evalcost but I might
be wrong.

-- 
 Bastien