Skip to content

Commit c2dcd40

Browse files
iyzanaemersion
authored andcommitted
Show cleared state when backspacing last character
1 parent b70d85e commit c2dcd40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

password.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void swaylock_handle_key(struct swaylock_state *state,
146146
state->input_state = INPUT_STATE_CLEAR;
147147
cancel_password_clear(state);
148148
} else {
149-
if (backspace(&state->password)) {
149+
if (backspace(&state->password) && state->password.len != 0) {
150150
state->input_state = INPUT_STATE_BACKSPACE;
151151
schedule_password_clear(state);
152152
update_highlight(state);

0 commit comments

Comments
 (0)