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:
Nicholas Marriott
2009-07-27 12:11:11 +00:00
parent fc65da1eed
commit ad0aad21d5
4 changed files with 16 additions and 0 deletions

View File

@ -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;