We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8566f9b commit 01fb11fCopy full SHA for 01fb11f
src/prompt_toolkit/shortcuts/dialogs.py
@@ -264,7 +264,6 @@ def progress_dialog(
264
:param run_callback: A function that receives as input a `set_percentage`
265
function and it does the work.
266
"""
267
- loop = get_running_loop()
268
progressbar = ProgressBar()
269
text_area = TextArea(
270
focusable=False,
@@ -291,7 +290,7 @@ def set_percentage(value: int) -> None:
291
290
app.invalidate()
292
293
def log_text(text: str) -> None:
294
- loop.call_soon_threadsafe(text_area.buffer.insert_text, text)
+ app.loop.call_soon_threadsafe(text_area.buffer.insert_text, text)
295
296
297
# Run the callback in the executor. When done, set a return value for the
0 commit comments