Fix the `*_with_cwd` actions using the cwd of the overlay window rather than the underlying window's cwd
Fix #1045
This commit is contained in:
parent
2637018b53
commit
715f7985c7
@ -10,6 +10,9 @@ Changelog
|
|||||||
extended scrollback to use when viewing the scrollback buffer in a pager
|
extended scrollback to use when viewing the scrollback buffer in a pager
|
||||||
(:iss:`970`)
|
(:iss:`970`)
|
||||||
|
|
||||||
|
- Fix the ``*_with_cwd`` actions using the cwd of the overlay window rather
|
||||||
|
than the underlying window's cwd (:iss:`1045`)
|
||||||
|
|
||||||
|
|
||||||
0.12.3 [2018-09-29]
|
0.12.3 [2018-09-29]
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|||||||
@ -240,8 +240,15 @@ class Boss:
|
|||||||
def new_os_window(self, *args):
|
def new_os_window(self, *args):
|
||||||
self._new_os_window(args)
|
self._new_os_window(args)
|
||||||
|
|
||||||
def new_os_window_with_cwd(self, *args):
|
@property
|
||||||
|
def active_window_for_cwd(self):
|
||||||
w = self.active_window
|
w = self.active_window
|
||||||
|
if w is not None and w.overlay_for is not None and w.overlay_for in self.window_id_map:
|
||||||
|
w = self.window_id_map[w.overlay_for]
|
||||||
|
return w
|
||||||
|
|
||||||
|
def new_os_window_with_cwd(self, *args):
|
||||||
|
w = self.active_window_for_cwd
|
||||||
cwd_from = w.child.pid if w is not None else None
|
cwd_from = w.child.pid if w is not None else None
|
||||||
self._new_os_window(args, cwd_from)
|
self._new_os_window(args, cwd_from)
|
||||||
|
|
||||||
@ -878,7 +885,7 @@ class Boss:
|
|||||||
self._create_tab(args)
|
self._create_tab(args)
|
||||||
|
|
||||||
def new_tab_with_cwd(self, *args):
|
def new_tab_with_cwd(self, *args):
|
||||||
w = self.active_window
|
w = self.active_window_for_cwd
|
||||||
cwd_from = w.child.pid if w is not None else None
|
cwd_from = w.child.pid if w is not None else None
|
||||||
self._create_tab(args, cwd_from=cwd_from)
|
self._create_tab(args, cwd_from=cwd_from)
|
||||||
|
|
||||||
@ -894,7 +901,7 @@ class Boss:
|
|||||||
self._new_window(args)
|
self._new_window(args)
|
||||||
|
|
||||||
def new_window_with_cwd(self, *args):
|
def new_window_with_cwd(self, *args):
|
||||||
w = self.active_window
|
w = self.active_window_for_cwd
|
||||||
if w is None:
|
if w is None:
|
||||||
return self.new_window(*args)
|
return self.new_window(*args)
|
||||||
cwd_from = w.child.pid if w is not None else None
|
cwd_from = w.child.pid if w is not None else None
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user