File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -490,6 +490,7 @@ def select_pane(self) -> "Pane":
490
490
def split (
491
491
self ,
492
492
/ ,
493
+ target : t .Optional [t .Union [int , str ]] = None ,
493
494
start_directory : t .Optional [str ] = None ,
494
495
attach : bool = False ,
495
496
direction : t .Optional [PaneDirection ] = None ,
@@ -616,6 +617,9 @@ def split(
616
617
if not attach :
617
618
tmux_args += ("-d" ,)
618
619
620
+ if target is not None :
621
+ tmux_args += (f"-t{ target } " ,)
622
+
619
623
if environment :
620
624
if has_gte_version ("3.0" ):
621
625
for k , v in environment .items ():
@@ -806,6 +810,7 @@ def at_right(self) -> bool:
806
810
#
807
811
def split_window (
808
812
self ,
813
+ target : t .Optional [t .Union [int , str ]] = None ,
809
814
attach : bool = False ,
810
815
start_directory : t .Optional [str ] = None ,
811
816
vertical : bool = True ,
@@ -843,6 +848,7 @@ def split_window(
843
848
if size is None and percent is not None :
844
849
size = f'{ str (percent ).rstrip ("%" )} %'
845
850
return self .split (
851
+ target = target ,
846
852
attach = attach ,
847
853
start_directory = start_directory ,
848
854
direction = PaneDirection .Below if vertical else PaneDirection .Right ,
Original file line number Diff line number Diff line change @@ -239,6 +239,7 @@ def split(
239
239
"""
240
240
active_pane = self .active_pane or self .panes [0 ]
241
241
return active_pane .split (
242
+ target = target ,
242
243
start_directory = start_directory ,
243
244
attach = attach ,
244
245
direction = direction ,
You can’t perform that action at this time.
0 commit comments