Skip to content

Commit 3f745fd

Browse files
committed
refactor(WorkspaceBuilder): Extract DEFAULT_SIZE for mockability
1 parent d4e4f86 commit 3f745fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tmuxp/workspacebuilder.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919

2020
logger = logging.getLogger(__name__)
2121

22+
DEFAULT_WIDTH = "800"
23+
DEFAULT_HEIGHT = "600"
24+
DEFAULT_SIZE = f"{DEFAULT_WIDTH}x{DEFAULT_HEIGHT}"
25+
2226

2327
class WorkspaceBuilder:
2428

@@ -219,7 +223,7 @@ def build(self, session=None, append=False):
219223

220224
if has_gte_version("2.9"):
221225
# Use tmux default session size, overwrite Server::new_session
222-
session.set_option("default-size", "800x600")
226+
session.set_option("default-size", DEFAULT_SIZE)
223227

224228
self.session = session
225229
self.server = session.server

0 commit comments

Comments
 (0)