Date: Thu, 6 Jul 2017 15:21:58 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320740 - head/sys/ddb Message-ID: <201707061521.v66FLwCW064631@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Thu Jul 6 15:21:57 2017 New Revision: 320740 URL: https://svnweb.freebsd.org/changeset/base/320740 Log: Make ^w work in ddb(4). Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/ddb/db_input.c Modified: head/sys/ddb/db_input.c ============================================================================== --- head/sys/ddb/db_input.c Thu Jul 6 15:08:51 2017 (r320739) +++ head/sys/ddb/db_input.c Thu Jul 6 15:21:57 2017 (r320740) @@ -217,6 +217,19 @@ db_inputchar(c) cnputc(db_lc[-1]); } break; + case CTRL('w'): + /* erase previous word */ + for (; db_lc > db_lbuf_start;) { + if (*(db_lc - 1) != ' ') + break; + db_delete(1, DEL_BWD); + } + for (; db_lc > db_lbuf_start;) { + if (*(db_lc - 1) == ' ') + break; + db_delete(1, DEL_BWD); + } + break; case CTRL('r'): db_putstring("^R\n", 3); redraw:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707061521.v66FLwCW064631>