Sync OpenBSD patchset 187:

Add a key to delete to end of line at the prompt (^K in emacs mode, C/D in
vi).

From Kalle Olavi Niemitalo.
This commit is contained in:
Tiago Cunha
2009-07-28 22:44:38 +00:00
parent 7562781c9d
commit 46cb0de347
4 changed files with 20 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $Id: status.c,v 1.102 2009-07-28 22:32:15 tcunha Exp $ */
/* $Id: status.c,v 1.103 2009-07-28 22:44:38 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -823,6 +823,12 @@ status_prompt_key(struct client *c, int key)
c->flags |= CLIENT_STATUS;
}
break;
case MODEKEYCMD_DELETETOENDOFLINE:
if (c->prompt_index < size) {
c->prompt_buffer[c->prompt_index] = '\0';
c->flags |= CLIENT_STATUS;
}
break;
case MODEKEYCMD_UP:
if (server_locked)
break;