From 9047157b5eeab5e604335417d12be0edbb79f2fd Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 19 Aug 2020 09:27:44 -0500 Subject: [PATCH] client: Reset prompt on agent exit When the client is interrupted in the middle of user input entry and the input is masked, the terminal might be left in a weird state. Make sure to reset the prompt if the agent is being cleaned up in the middle of an operation. --- client/agent.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/agent.c b/client/agent.c index 157b61c0..037ae785 100644 --- a/client/agent.c +++ b/client/agent.c @@ -481,8 +481,10 @@ bool agent_exit(const char *path) { struct l_dbus *dbus = dbus_get_bus(); - if (pending_message) + if (pending_message) { l_dbus_message_unref(pending_message); + display_agent_prompt_release(pending_op.last_label); + } l_queue_destroy(pending_op.saved_input, l_free);