From 843a1bb43e70ab041524dbc696ed37246a6b2b79 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 5 Jan 2025 10:43:01 -0300 Subject: Fix: use patch_stdout() --- packages/finder/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/finder/main.py b/packages/finder/main.py index 4c8f752..9396201 100644 --- a/packages/finder/main.py +++ b/packages/finder/main.py @@ -40,6 +40,7 @@ try: from prompt_toolkit.layout.margins import NumberedMargin, ScrollbarMargin from prompt_toolkit.enums import EditingMode from prompt_toolkit.document import Document + from prompt_toolkit.patch_stdout import patch_stdout except ImportError: print("Please install prompt_toolkit first!") raise ImportError @@ -315,7 +316,8 @@ class FinderMain(): self.state['loading'] = False def run(self): - return asyncio.run(self.main()) + with patch_stdout(): + return asyncio.run(self.main()) def set_handlers(self): # Searcher and opener objects -- cgit v1.2.3