Skip to content

Commit f041c93

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

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tmuxp/workspacebuilder.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import logging
88
import time
99

10-
from libtmux.common import has_gte_version
1110
from libtmux.exc import TmuxSessionExists
1211
from libtmux.pane import Pane
1312
from libtmux.server import Server
@@ -221,10 +220,6 @@ def build(self, session=None, append=False):
221220
assert self.sconf["session_name"] == session.name
222221
assert len(self.sconf["session_name"]) > 0
223222

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-
228223
self.session = session
229224
self.server = session.server
230225

@@ -272,6 +267,9 @@ def build(self, session=None, append=False):
272267
assert isinstance(p, Pane)
273268
p = p
274269

270+
if "layout" in wconf:
271+
w.select_layout(wconf["layout"])
272+
275273
if "focus" in pconf and pconf["focus"]:
276274
focus_pane = p
277275

@@ -286,8 +284,6 @@ def build(self, session=None, append=False):
286284
if focus_pane:
287285
focus_pane.select_pane()
288286

289-
w.select_layout(wconf.get("layout", "even-vertical"))
290-
291287
if focus:
292288
focus.select_window()
293289

@@ -428,6 +424,8 @@ def get_pane_shell():
428424
)
429425

430426
assert isinstance(p, Pane)
427+
if "layout" in wconf:
428+
w.select_layout(wconf["layout"])
431429

432430
if "suppress_history" in pconf:
433431
suppress = pconf["suppress_history"]

0 commit comments

Comments
 (0)