silc-client: handle prompt abort better
[silc.git] / apps / irssi / src / silc / core / clientutil.c
index a8a1b5b7328e318b547ac8f36e3a2b9d86049c51..0daceefff530e2952e227223e0271abc90067985 100644 (file)
@@ -411,6 +411,14 @@ static void silc_keyboard_entry_redirect_abort(SilcAsyncOperation op,
    * the operation has been aborted.
    */
   ctx->user_prompt_proc(NULL, ctx->user_context, KeyboardCompletionAborted);
+
+  /*
+   * Allow new prompt after we've abored despite us leaking Irssi prompt
+   * data.  It's more important to get new prompt up and this abort
+   * guarantees we handle things correctly towards silcclient library by
+   * calling the callback above.
+   */
+  silc_keyboard_prompt_pending = FALSE;
 }
 
 static void silc_keyboard_entry_redirect_completion(const char *line,