I believe I’ve found a prompt display error in Readline 8.3: the prompt gets shoved into the start of the line during a redraw when the previous command’s output lacks a trailing newline.
If readline doesn't start in column 0, all display bets are off.
It's possible that a different strategy used to move around the line,
especially after the text on the line wraps, leads to display corruption at
a different point. However, if readline isn't where it thinks it is on the
line, you will eventually get display corruption. This is exacerbated by
having to keep track of the difference between the cursor's physical
column and the offset in the line buffer, including invisible characters.
For example, if readline starts in physical column 42 instead of column 0,
and after drawing the prompt is in physical column 44 instead of 2, the
redisplay thinks it can backspace twice to move to column 0 (or worse,
readline thinks it can use a carriage return to move the cursor back to
column 0 and move from there). This isn't going to work, of course, because
readline isn't where it thinks it is.
Readline could force this, by printing a \r to make sure the cursor is in
column 0, but then you'd get complaints about overwriting the line
contents.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
