Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/msgc implement word kill with control-W
details: https://anonhg.NetBSD.org/src/rev/c288367dc1a2
branches: trunk
changeset: 473962:c288367dc1a2
user: cgd <cgd%NetBSD.org@localhost>
date: Wed Jun 23 17:42:11 1999 +0000
description:
implement word kill with control-W
diffstat:
usr.bin/msgc/msg_sys.def | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diffs (40 lines):
diff -r 1d8bb576ac31 -r c288367dc1a2 usr.bin/msgc/msg_sys.def
--- a/usr.bin/msgc/msg_sys.def Wed Jun 23 17:32:32 1999 +0000
+++ b/usr.bin/msgc/msg_sys.def Wed Jun 23 17:42:11 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_sys.def,v 1.8 1999/06/23 17:32:32 cgd Exp $ */
+/* $NetBSD: msg_sys.def,v 1.9 1999/06/23 17:42:11 cgd Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -301,6 +301,30 @@
wdelch(msg_win);
}
}
+ } else if (ch == 0x17) { /* ^W; word kill */
+ /*
+ * word kill kills the spaces and the 'word'
+ * (non-spaces) last typed. the spaces before
+ * the 'word' aren't killed.
+ */
+ while (count > 0 && isspace(ibuf[count - 1])) {
+ count--;
+ if (do_echo) {
+ getyx(msg_win, y, x);
+ x--;
+ wmove(msg_win, y, x);
+ wdelch(msg_win);
+ }
+ }
+ while (count > 0 && !isspace(ibuf[count - 1])) {
+ 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);
Home |
Main Index |
Thread Index |
Old Index