mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 21:45:03 +02:00
Use a full window object rather than a child PID to get cwd
This allows implementation of more sophisticated algorithmhs for getting the cwd
This commit is contained in:
@@ -290,7 +290,7 @@ def load_watch_modules(watchers: Iterable[str]) -> Optional[Watchers]:
|
||||
class LaunchKwds(TypedDict):
|
||||
|
||||
allow_remote_control: bool
|
||||
cwd_from: Optional[int]
|
||||
cwd_from: Optional[Window]
|
||||
cwd: Optional[str]
|
||||
location: Optional[str]
|
||||
override_title: Optional[str]
|
||||
@@ -357,8 +357,8 @@ def launch(
|
||||
}
|
||||
if opts.cwd:
|
||||
if opts.cwd == 'current':
|
||||
if active_child:
|
||||
kw['cwd_from'] = active_child.pid_for_cwd
|
||||
if active:
|
||||
kw['cwd_from'] = active
|
||||
else:
|
||||
kw['cwd'] = opts.cwd
|
||||
if opts.location != 'default':
|
||||
|
||||
Reference in New Issue
Block a user