Skip to content

Commit 25222e7

Browse files
committed
chore(Session.new_window): Return window_index functionality
This reverts commit b46e7fa.
1 parent 6215bdb commit 25222e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libtmux/session.py

+4
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,10 @@ def new_window(
635635
if window_name is not None and isinstance(window_name, str):
636636
window_args += ("-n", window_name)
637637

638+
if window_index is not None:
639+
# empty string for window_index will use the first one available
640+
window_args += (f"-t{self.session_id}:{window_index}",)
641+
638642
if environment:
639643
if has_gte_version("3.0"):
640644
for k, v in environment.items():

0 commit comments

Comments
 (0)