Skip to content

Commit 0390150

Browse files
committed
feat!(Pane.split_window): Accept same arguments as Window.split_window
1 parent 98346f7 commit 0390150

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/libtmux/pane.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,12 @@ def select_pane(self) -> "Pane":
432432
def split_window(
433433
self,
434434
attach: bool = False,
435-
vertical: bool = True,
436435
start_directory: t.Optional[str] = None,
437-
percent: t.Optional[int] = None,
436+
vertical: bool = True,
437+
shell: t.Optional[str] = None,
438+
size: t.Optional[t.Union[str, int]] = None,
439+
percent: t.Optional[int] = None, # deprecated
440+
environment: t.Optional[t.Dict[str, str]] = None,
438441
) -> "Pane": # New Pane, not self
439442
"""Split window at pane and return newly created :class:`Pane`.
440443
@@ -448,13 +451,22 @@ def split_window(
448451
specifies the working directory in which the new pane is created.
449452
percent: int, optional
450453
percentage to occupy with respect to current pane
454+
455+
Notes
456+
-----
457+
.. deprecated:: 0.28.0
458+
459+
``percent=25`` deprecated in favor of ``size="25%"``.
451460
"""
452461
return self.window.split_window(
453462
target=self.pane_id,
454-
start_directory=start_directory,
455463
attach=attach,
464+
start_directory=start_directory,
456465
vertical=vertical,
466+
shell=shell,
467+
size=size,
457468
percent=percent,
469+
environment=environment,
458470
)
459471

460472
"""

0 commit comments

Comments
 (0)