teach the message prompting code to use control-U as line kill character.
(not really the right thing, but it already hard-codes backspace and delete rather than using the terminal settings...)
This commit is contained in:
parent
72fcd1784e
commit
5fa829d0bd
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: msg_sys.def,v 1.3 1999/06/19 00:00:48 cgd Exp $ */
|
||||
/* $NetBSD: msg_sys.def,v 1.4 1999/06/19 00:13:19 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997 Piermont Information Systems Inc.
|
||||
|
@ -157,8 +157,17 @@ static void msg_vprompt (char *msg, char *def, char *val, int max_chars,
|
|||
}
|
||||
} else
|
||||
msg_beep ();
|
||||
}
|
||||
else if (count < (max_chars - 1) && isprint(ch)) {
|
||||
} else if (ch == 0x15) { /* ^U; line kill */
|
||||
while (count > 0) {
|
||||
count--;
|
||||
if (do_echo) {
|
||||
getyx(msg_win, y, x);
|
||||
x--;
|
||||
wmove(msg_win, y, x);
|
||||
wdelch(msg_win);
|
||||
}
|
||||
}
|
||||
} else if (count < (max_chars - 1) && isprint(ch)) {
|
||||
if (do_echo)
|
||||
waddch (msg_win, ch);
|
||||
ibuf[count++] = ch;
|
||||
|
|
Loading…
Reference in New Issue