Skip to content

Commit 2d3516e

Browse files
committed
Revert "Fix layout related issues #737, #667, #704"
This reverts commit fb9a8af.
1 parent d3d30fb commit 2d3516e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Diff for: tmuxp/workspacebuilder.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@ def build(self, session=None, append=False):
221221
assert self.sconf["session_name"] == session.name
222222
assert len(self.sconf["session_name"]) > 0
223223

224-
if has_gte_version("2.9"):
225-
# Use tmux default session size, overwrite Server::new_session
226-
session.set_option("default-size", DEFAULT_SIZE)
227-
228224
self.session = session
229225
self.server = session.server
230226

@@ -272,6 +268,9 @@ def build(self, session=None, append=False):
272268
assert isinstance(p, Pane)
273269
p = p
274270

271+
if "layout" in wconf:
272+
w.select_layout(wconf["layout"])
273+
275274
if "focus" in pconf and pconf["focus"]:
276275
focus_pane = p
277276

@@ -286,8 +285,6 @@ def build(self, session=None, append=False):
286285
if focus_pane:
287286
focus_pane.select_pane()
288287

289-
w.select_layout(wconf.get("layout", "even-vertical"))
290-
291288
if focus:
292289
focus.select_window()
293290

@@ -428,6 +425,8 @@ def get_pane_shell():
428425
)
429426

430427
assert isinstance(p, Pane)
428+
if "layout" in wconf:
429+
w.select_layout(wconf["layout"])
431430

432431
if "suppress_history" in pconf:
433432
suppress = pconf["suppress_history"]

0 commit comments

Comments
 (0)