mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-27 03:11:46 +00:00
Fix edit-in-kitty not working when option editor comes with arguments
This commit is contained in:
parent
297dea881d
commit
1652d41992
1 changed files with 1 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue