From c2dcd40c341bc7a8ce00030cea2feb2f4c5c3026 Mon Sep 17 00:00:00 2001 From: iyzana <16743652+iyzana@users.noreply.github.com> Date: Thu, 29 Jun 2023 11:21:10 +0200 Subject: [PATCH] Show cleared state when backspacing last character --- password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/password.c b/password.c index cae568e..5349e13 100644 --- a/password.c +++ b/password.c @@ -146,7 +146,7 @@ void swaylock_handle_key(struct swaylock_state *state, state->input_state = INPUT_STATE_CLEAR; cancel_password_clear(state); } else { - 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);