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