Ensure Tab has cwd even with no initial window
This commit is contained in:
parent
fb3acd1f4a
commit
cab87f6fb2
@ -57,10 +57,10 @@ class Tab: # {{{
|
|||||||
for i, which in enumerate('first second third fourth fifth sixth seventh eighth ninth tenth'.split()):
|
for i, which in enumerate('first second third fourth fifth sixth seventh eighth ninth tenth'.split()):
|
||||||
setattr(self, which + '_window', partial(self.nth_window, num=i))
|
setattr(self, which + '_window', partial(self.nth_window, num=i))
|
||||||
self._last_used_layout = self._current_layout_name = None
|
self._last_used_layout = self._current_layout_name = None
|
||||||
|
self.cwd = self.args.directory
|
||||||
if no_initial_window:
|
if no_initial_window:
|
||||||
self._set_current_layout(self.enabled_layouts[0])
|
self._set_current_layout(self.enabled_layouts[0])
|
||||||
elif session_tab is None:
|
elif session_tab is None:
|
||||||
self.cwd = self.args.directory
|
|
||||||
sl = self.enabled_layouts[0]
|
sl = self.enabled_layouts[0]
|
||||||
self._set_current_layout(sl)
|
self._set_current_layout(sl)
|
||||||
if special_window is None:
|
if special_window is None:
|
||||||
@ -68,7 +68,8 @@ class Tab: # {{{
|
|||||||
else:
|
else:
|
||||||
self.new_special_window(special_window)
|
self.new_special_window(special_window)
|
||||||
else:
|
else:
|
||||||
self.cwd = session_tab.cwd or self.args.directory
|
if session_tab.cwd:
|
||||||
|
self.cwd = session_tab.cwd
|
||||||
l0 = session_tab.layout
|
l0 = session_tab.layout
|
||||||
self._set_current_layout(l0)
|
self._set_current_layout(l0)
|
||||||
self.startup(session_tab)
|
self.startup(session_tab)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user