mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
Fix edit-in-kitty not working when option editor comes with arguments
This commit is contained in:
@@ -672,7 +672,7 @@ def get_editor(opts: Optional[Options] = None, path_to_edit: str = '', line_numb
|
|||||||
ans = shlex.split(opts.editor)
|
ans = shlex.split(opts.editor)
|
||||||
if path_to_edit:
|
if path_to_edit:
|
||||||
if line_number:
|
if line_number:
|
||||||
eq = os.path.basename(ans[-1]).lower()
|
eq = os.path.basename(ans[0]).lower()
|
||||||
if eq in ('code', 'code.exe'):
|
if eq in ('code', 'code.exe'):
|
||||||
path_to_edit += f':{line_number}'
|
path_to_edit += f':{line_number}'
|
||||||
ans.append('--goto')
|
ans.append('--goto')
|
||||||
|
|||||||
Reference in New Issue
Block a user