1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

When redrawing an input line, count backspaces to get to the beginning of

the input field from the current cursor location, rather than the end of
the input line, as the cursor may not be at the end of the line.
Otherwise, we may overshoot, overwriting a bit of the previous line and
failing to fully overwrite the current line.

MFC after:	3 days
PR:		119079
Submitted by:	Michael Plass <mfp49_freebsd@plass-family.net>
This commit is contained in:
Robert Watson 2008-03-06 10:10:43 +00:00
parent fa5161a674
commit ea1c6a394a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176870

View File

@ -250,7 +250,7 @@ db_inputchar(c)
}
hist_redraw:
db_putnchars(BACKUP, db_le - db_lbuf_start);
db_putnchars(BACKUP, db_lc - db_lbuf_start);
db_putnchars(BLANK, db_le - db_lbuf_start);
db_putnchars(BACKUP, db_le - db_lbuf_start);
db_le = index(db_lbuf_start, '\0');