Skip to content

Commit

Permalink
Show cleared state when backspacing last character
Browse files Browse the repository at this point in the history
  • Loading branch information
iyzana committed Jun 29, 2023
1 parent 2018673 commit 315419e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion password.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void swaylock_handle_key(struct swaylock_state *state,
break;
case XKB_KEY_Delete:
case XKB_KEY_BackSpace:
if (backspace(&state->password)) {
if (backspace(&state->password) && state->password.len != 0) {
state->input_state = INPUT_STATE_BACKSPACE;
schedule_password_clear(state);
update_highlight(state);
Expand Down

0 comments on commit 315419e

Please sign in to comment.