summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-03-06 10:10:43 +0000
committerrwatson <rwatson@FreeBSD.org>2008-03-06 10:10:43 +0000
commit4f85f33b1f835790e706d83c95514f032d443c68 (patch)
tree14ff706887a313a658f643cbbec9e0baa21731ba /sys/ddb
parentcf2f90eaa8205e99b6f258a569bc7cacf4579e24 (diff)
downloadFreeBSD-src-4f85f33b1f835790e706d83c95514f032d443c68.zip
FreeBSD-src-4f85f33b1f835790e706d83c95514f032d443c68.tar.gz
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>
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ddb/db_input.c b/sys/ddb/db_input.c
index dc07a1d..b71324e 100644
--- a/sys/ddb/db_input.c
+++ b/sys/ddb/db_input.c
@@ -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');
OpenPOWER on IntegriCloud