Skip to content

Commit 95601b9

Browse files
committed
fix!(Window.split_window): Detach by default
1 parent b025d88 commit 95601b9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/libtmux/window.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def split_window(
177177
self,
178178
target: t.Optional[t.Union[int, str]] = None,
179179
start_directory: t.Optional[str] = None,
180-
attach: bool = True,
180+
attach: bool = False,
181181
vertical: bool = True,
182182
shell: t.Optional[str] = None,
183183
percent: t.Optional[int] = None,
@@ -220,6 +220,10 @@ def split_window(
220220
By default, this will make the window the pane is created in
221221
active. To remain on the same window and split the pane in another
222222
target window, pass in ``attach=False``.
223+
224+
.. versionchanged:: 0.28.0
225+
226+
``attach`` default changed from ``True`` to ``False``.
223227
"""
224228
tmux_formats = ["#{pane_id}" + FORMAT_SEPARATOR]
225229

tests/test_dataclasses.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ def test_pane(
4040

4141
__window = __session.attached_window
4242
__window.split_window()
43-
__window.split_window()
43+
__pane = __window.split_window()
4444
__window.select_layout("main-vertical")
4545

46-
__pane = __window.attached_pane
47-
4846
assert __pane is not None
4947
assert __pane.pane_id is not None
5048

0 commit comments

Comments
 (0)