1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-05 18:05:16 +00:00

^U kills an entire input line in most applications,

including the default terminal canonical mode.
So let ddb(4) be no exception from this rule.

Pointed out by: Mark Peek <mark@peek.org>
This commit is contained in:
Yaroslav Tykhiy 2002-02-12 23:38:40 +00:00
parent 6df7ca7b17
commit 09ffa9ad5e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90591

View File

@ -189,16 +189,17 @@ db_inputchar(c)
if (db_lc > db_lbuf_start)
db_delete(1, DEL_BWD);
break;
case CTRL('u'):
/* delete to beginning of line */
if (db_lc > db_lbuf_start)
db_delete(db_lc - db_lbuf_start, DEL_BWD);
break;
case CTRL('d'):
/* erase next character */
if (db_lc < db_le)
db_delete(1, DEL_FWD);
break;
case CTRL('u'):
/* kill entire line: */
/* at first, delete to beginning of line */
if (db_lc > db_lbuf_start)
db_delete(db_lc - db_lbuf_start, DEL_BWD);
/* FALLTHROUGH */
case CTRL('k'):
/* delete to end of line */
if (db_lc < db_le)