Skip to content

Commit ca86fc5

Browse files
committed
chore(Pane): Fix select_pane typing
1 parent 3b913b3 commit ca86fc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libtmux/pane.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ def select_pane(self) -> "Pane":
285285
-------
286286
:class:`pane`
287287
"""
288-
return self.window.select_pane(self.get("pane_id"))
288+
pane = self.window.select_pane(self._pane_id)
289+
if pane is None:
290+
raise exc.LibTmuxException(f"Pane not found: {self}")
291+
return pane
289292

290293
def __repr__(self) -> str:
291294
return "{}({} {})".format(

0 commit comments

Comments
 (0)