From b173dd1c39be04028131502cd0b9e6fe096444a2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Aug 2021 16:57:01 +0530 Subject: [PATCH] Fix error getting editor in remote file kitten not being reported --- kittens/remote_file/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kittens/remote_file/main.py b/kittens/remote_file/main.py index 021781129..b2e3390f7 100644 --- a/kittens/remote_file/main.py +++ b/kittens/remote_file/main.py @@ -286,6 +286,7 @@ def handle_action(action: str, cli_opts: RemoteFileCLIOptions) -> Result: show_error('Failed to copy file from remote machine') elif action == 'edit': print('Editing', cli_opts.path, 'from', cli_opts.hostname) + editor = get_editor() with ControlMaster(conn_data, remote_path, cli_opts) as master: if not master.check_hostname_matches(): return None @@ -294,7 +295,6 @@ def handle_action(action: str, cli_opts: RemoteFileCLIOptions) -> Result: return None mtime = os.path.getmtime(master.dest) print(reset_terminal(), end='', flush=True) - editor = get_editor() editor_process = subprocess.Popen(editor + [master.dest]) while editor_process.poll() is None: time.sleep(0.1)