kbdfs: support ^W word killing

cinap_lenrek 2011-06-15 12:34:30 +02:00
parent 675e74d30e
commit 21ede7960f
1 changed files with 7 additions and 4 deletions

View File

@ -568,16 +568,19 @@ lineproc(void *aux)
case '\0': /* flush */
nr = 0;
continue;
case '\b': /* backspace */
case Knack: /* ^U */
case Kbs: /* ^H: erase character */
case Knack: /* ^U: erase line */
case Ketb: /* ^W: erase word */
while(nr > 0){
nr--;
fprint(1, "\b");
if(r == '\b')
if(r == Kbs)
break;
if(r == Ketb && utfrune(" \t", rb[nr]))
break;
}
continue;
case Keof: /* ^D */
case Keof: /* ^D: eof */
done = 1;
break;
case '\n':