1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Fixed delete on no input

This commit is contained in:
James Booth 2012-02-06 22:07:50 +00:00
parent b2173522cd
commit 14f4478bea

View File

@ -126,10 +126,12 @@ void event_loop(xmpp_ctx_t *ctx, xmpp_conn_t *conn)
// if delete pressed, go back and delete it
if (ch == 127) {
getyx(cmd_win, cmd_y, cmd_x);
wmove(cmd_win, cmd_y, cmd_x-1);
wdelch(cmd_win);
size--;
if (size > 0) {
getyx(cmd_win, cmd_y, cmd_x);
wmove(cmd_win, cmd_y, cmd_x-1);
wdelch(cmd_win);
size--;
}
}
// else if not error or newline, show it and store it
else if (ch != ERR && ch != '\n') {