File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -728,7 +728,7 @@ def select(self) -> "Window":
728728 # Computed properties
729729 #
730730 @property
731- def attached_pane (self ) -> t .Optional ["Pane" ]:
731+ def active_pane (self ) -> t .Optional ["Pane" ]:
732732 """Return attached :class:`Pane`."""
733733 panes = self .panes .filter (pane_active = "1" )
734734 if len (panes ) > 0 :
@@ -820,6 +820,26 @@ def width(self) -> t.Optional[str]:
820820 #
821821 # Legacy: Redundant stuff we want to remove
822822 #
823+ @property
824+ def attached_pane (self ) -> t .Optional ["Pane" ]:
825+ """Return attached :class:`Pane`.
826+
827+ Notes
828+ -----
829+ .. deprecated:: 0.31
830+
831+ Deprecated in favor of :meth:`.active_pane`.
832+ """
833+ warnings .warn (
834+ "Window.attached_pane() is deprecated in favor of Window.active_pane()" ,
835+ category = DeprecationWarning ,
836+ stacklevel = 2 ,
837+ )
838+ panes = self .panes .filter (pane_active = "1" )
839+ if len (panes ) > 0 :
840+ return panes [0 ]
841+ return None
842+
823843 def select_window (self ) -> "Window" :
824844 """Select window.
825845
You can’t perform that action at this time.
0 commit comments