File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -636,10 +636,6 @@ def new_window(
636
636
if window_name is not None and isinstance (window_name , str ):
637
637
window_args += ("-n" , window_name )
638
638
639
- if window_index is not None :
640
- # empty string for window_index will use the first one available
641
- window_args += (f"-t{ self .session_id } :{ window_index } " ,)
642
-
643
639
if environment :
644
640
if has_gte_version ("3.0" ):
645
641
for k , v in environment .items ():
@@ -664,6 +660,9 @@ def new_window(
664
660
logger .warning (
665
661
"Window target ignored, requires tmux 3.1 or newer." ,
666
662
)
663
+ elif window_index is not None :
664
+ # empty string for window_index will use the first one available
665
+ window_args += (f"-t{ self .session_id } :{ window_index } " ,)
667
666
668
667
if window_shell :
669
668
window_args += (window_shell ,)
You can’t perform that action at this time.
0 commit comments