Skip to content

Commit d643942

Browse files
committed
fix!(Session.new_window): Do not attach by default
1 parent 45b4a3d commit d643942

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/libtmux/session.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def new_window(
436436
self,
437437
window_name: t.Optional[str] = None,
438438
start_directory: None = None,
439-
attach: bool = True,
439+
attach: bool = False,
440440
window_index: str = "",
441441
window_shell: t.Optional[str] = None,
442442
environment: t.Optional[t.Dict[str, str]] = None,
@@ -465,6 +465,10 @@ def new_window(
465465
useful for long-running processes where the closing of the
466466
window upon completion is desired.
467467
468+
.. versionchanged:: 0.28.0
469+
470+
``attach`` default changed from ``True`` to ``False``.
471+
468472
Returns
469473
-------
470474
:class:`Window`

src/libtmux/window.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Window(Obj):
3939
4040
Examples
4141
--------
42-
>>> window = session.new_window('My project')
42+
>>> window = session.new_window('My project', attach=True)
4343
4444
>>> window
4545
Window(@2 2:My project, Session($... ...))

0 commit comments

Comments
 (0)