Skip to content

Commit 111716e

Browse files
committed
feat({Window,Pane}.split): Add zoom
1 parent eeb396f commit 111716e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/libtmux/pane.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ def split(
493493
attach: bool = False,
494494
direction: t.Optional[PaneDirection] = None,
495495
full_window_split: t.Optional[bool] = None,
496+
zoom: t.Optional[bool] = None,
496497
shell: t.Optional[str] = None,
497498
size: t.Optional[t.Union[str, int]] = None,
498499
environment: t.Optional[t.Dict[str, str]] = None,
@@ -510,6 +511,8 @@ def split(
510511
split in direction. If none is specified, assume down.
511512
full_window_split: bool, optional
512513
split across full window width or height, rather than active pane.
514+
zoom: bool, optional
515+
expand pane
513516
shell : str, optional
514517
execute a command on splitting the window. The pane will close
515518
when the command exits.
@@ -599,6 +602,9 @@ def split(
599602
if full_window_split:
600603
tmux_args += ("-f",)
601604

605+
if zoom:
606+
tmux_args += ("-Z",)
607+
602608
tmux_args += ("-P", "-F%s" % "".join(tmux_formats)) # output
603609

604610
if start_directory is not None:

src/libtmux/window.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def split(
204204
attach: bool = False,
205205
direction: t.Optional[PaneDirection] = None,
206206
full_window_split: t.Optional[bool] = None,
207+
zoom: t.Optional[bool] = None,
207208
shell: t.Optional[str] = None,
208209
size: t.Optional[t.Union[str, int]] = None,
209210
environment: t.Optional[t.Dict[str, str]] = None,
@@ -221,6 +222,8 @@ def split(
221222
split in direction. If none is specified, assume down.
222223
full_window_split: bool, optional
223224
split across full window width or height, rather than active pane.
225+
zoom: bool, optional
226+
expand pane
224227
shell : str, optional
225228
execute a command on splitting the window. The pane will close
226229
when the command exits.
@@ -239,6 +242,7 @@ def split(
239242
attach=attach,
240243
direction=direction,
241244
full_window_split=full_window_split,
245+
zoom=zoom,
242246
shell=shell,
243247
size=size,
244248
environment=environment,

0 commit comments

Comments
 (0)