Reverse wraparound across soft linebreaks
@egmontkob
Submitted by Egmont Koblinger Link to original bug (#764206)
Description
A few terminal emulators (e.g. urxvt, pterm/putty, xterm -rw) do reverse wraparound, meaning that when the cursor is in the first column and a '\b' is received, the cursor moves back to the end of the previous line.
In certain situations I find this nonstandard behavior totally irritating. E.g. when an app keeps outputting something, and in the same time I'm editing a command, I hate (for no particular concrete reason) the cursor wrapping back.
On the other hand, this is required for canonical mode (e.g. "cat" command) multiline editing to work correctly if backspaced over the line boundary. Currently this doesn't work as expected in vte (and most other terminal emulators). Ideally, any sequence of entering text, backspacing over line boundary, and resizing-rewrapping the window should result in the displayed text being in sync with the kernel tty driver's notion of the contents, that is, upon pressing Enter the contents as seen should be duplicated. Instead of this, backspacing visually stops at line boundary, even though the kernel's tty buffer is still modified.
Just occurred to me: Could it be the best way to mix the two worlds if reverse wraparound is allowed across soft linebreaks, but disallowed across hard ones? (Playing with the words, as we made up the terminology in the rewrap code: backspacing would work within a paragraph rather than a line.)
(It might require some fine tuning in how we define soft vs. hard linebreaks, e.g. printing a '\r' might need to convert the preceding linebreak into a hard one, we'll see.)
Version: git master