kbdfs: support ^W word killing
parent
675e74d30e
commit
21ede7960f
|
@ -568,16 +568,19 @@ lineproc(void *aux)
|
||||||
case '\0': /* flush */
|
case '\0': /* flush */
|
||||||
nr = 0;
|
nr = 0;
|
||||||
continue;
|
continue;
|
||||||
case '\b': /* backspace */
|
case Kbs: /* ^H: erase character */
|
||||||
case Knack: /* ^U */
|
case Knack: /* ^U: erase line */
|
||||||
|
case Ketb: /* ^W: erase word */
|
||||||
while(nr > 0){
|
while(nr > 0){
|
||||||
nr--;
|
nr--;
|
||||||
fprint(1, "\b");
|
fprint(1, "\b");
|
||||||
if(r == '\b')
|
if(r == Kbs)
|
||||||
|
break;
|
||||||
|
if(r == Ketb && utfrune(" \t", rb[nr]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
case Keof: /* ^D */
|
case Keof: /* ^D: eof */
|
||||||
done = 1;
|
done = 1;
|
||||||
break;
|
break;
|
||||||
case '\n':
|
case '\n':
|
||||||
|
|
Loading…
Reference in New Issue