diff --git a/edit.c b/edit.c index a9a8e4e..58abed0 100644 --- a/edit.c +++ b/edit.c @@ -5,7 +5,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.97 2007/05/22 21:13:56 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.98 2007/05/24 19:15:46 tg Exp $"); /* tty driver characters we are interested in */ typedef struct { @@ -1696,10 +1696,13 @@ x_delete(int nc, int push) * But if we must, make sure we do the minimum. */ if ((i = xx_cols - 2 - x_col) > 0 || xep - xlp == 0) { - nw = (i = ((nw < i) ? nw : i)) + 1; + nw = i = (nw < i) ? nw : i; while (i--) x_e_putc2(' '); - x_e_putc2((xep > xlp) ? '>' : (xbp > xbuf) ? '<' : ' '); + if (x_col == xx_cols - 2) { + x_e_putc2((xep > xlp) ? '>' : (xbp > xbuf) ? '<' : ' '); + ++nw; + } while (nw--) x_e_putc2('\b'); }