From 1652d41992d42af24d0c3ffda2fdaca4f52a5aa6 Mon Sep 17 00:00:00 2001 From: pagedown Date: Tue, 28 Jun 2022 11:41:27 +0800 Subject: [PATCH] Fix edit-in-kitty not working when option editor comes with arguments --- kitty/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/utils.py b/kitty/utils.py index 400638826..6fd7ec9e0 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -672,7 +672,7 @@ def get_editor(opts: Optional[Options] = None, path_to_edit: str = '', line_numb ans = shlex.split(opts.editor) if path_to_edit: if line_number: - eq = os.path.basename(ans[-1]).lower() + eq = os.path.basename(ans[0]).lower() if eq in ('code', 'code.exe'): path_to_edit += f':{line_number}' ans.append('--goto')