summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-08-18 07:23:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-08-18 07:23:44 +0000
commitbad94970bfb381c9d51d8f5188d6b2f59acac07b (patch)
treed1a2b9511983abe5fbd939a4ea19a44940eab3c2 /usr.bin/tmux/status.c
parent1cee65b0f7d3e704516348940da523cc3b61ff43 (diff)
Add a "delete line" key when editing in the status line or the search up/down
prompt. C-u with emacs keys, d with vi.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r--usr.bin/tmux/status.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 3a6b9f62186..9ba6f528ec0 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.25 2009/08/13 23:44:18 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.26 2009/08/18 07:23:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -854,6 +854,11 @@ status_prompt_key(struct client *c, int key)
c->flags |= CLIENT_STATUS;
}
break;
+ case MODEKEYEDIT_DELETELINE:
+ *c->prompt_buffer = '\0';
+ c->prompt_index = 0;
+ c->flags |= CLIENT_STATUS;
+ break;
case MODEKEYEDIT_DELETETOENDOFLINE:
if (c->prompt_index < size) {
c->prompt_buffer[c->prompt_index] = '\0';