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.
This commit is contained in:
Nicholas Marriott
2009-08-18 07:23:43 +00:00
parent c828c2f366
commit feaf91ab93
5 changed files with 14 additions and 1 deletions

View File

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