mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Fixed delete on no input
This commit is contained in:
parent
b2173522cd
commit
14f4478bea
10
profanity.c
10
profanity.c
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user