Skip to content

Commit 3a499f3

Browse files
committed
feat: Rename Session.attached_window -> Session.active_window
Deprecate Session.attached_window
1 parent aad83c3 commit 3a499f3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/libtmux/session.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def select_window(self, target_window: t.Union[str, int]) -> "Window":
353353
# Computed properties
354354
#
355355
@property
356-
def attached_window(self) -> "Window":
356+
def active_window(self) -> "Window":
357357
"""Return active :class:`Window` object."""
358358
active_windows = self.windows.filter(window_active="1")
359359

@@ -676,6 +676,16 @@ def name(self) -> t.Optional[str]:
676676
#
677677
# Legacy: Redundant stuff we want to remove
678678
#
679+
@property
680+
def attached_window(self) -> "Window":
681+
"""Return active :class:`Window` object.
682+
683+
.. deprecated:: 0.30
684+
685+
Deprecated in favor of :meth:`.active_window`.
686+
"""
687+
return self.active_window
688+
679689
def attach_session(self) -> "Session":
680690
"""Return ``$ tmux attach-session`` aka alias: ``$ tmux attach``.
681691

0 commit comments

Comments
 (0)