This commit is contained in:
tg 2007-05-22 21:13:56 +00:00
parent fec876cdcf
commit 8c986282ce
1 changed files with 3 additions and 5 deletions

8
edit.c
View File

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