From 2e2fae8b2571e295f459c9ff578501caaa014af5 Mon Sep 17 00:00:00 2001 From: Hajime Nakagami Date: Sun, 7 Jul 2024 08:15:17 +0900 Subject: [PATCH] Fix running external commands --- pyvim/commands/handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyvim/commands/handler.py b/pyvim/commands/handler.py index cf91dd5..b7d1443 100644 --- a/pyvim/commands/handler.py +++ b/pyvim/commands/handler.py @@ -1,3 +1,4 @@ +import asyncio from .grammar import COMMAND_GRAMMAR from .commands import call_command_handler, has_command_handler, substitute @@ -33,7 +34,8 @@ def handle_command(editor, input_string): elif shell_command is not None: # Handle shell commands. - editor.application.run_system_command(shell_command) + loop = asyncio.get_event_loop() + loop.create_task(editor.application.run_system_command(shell_command)) elif has_command_handler(command): # Handle other 'normal' commands.