diff --git a/CHANGES b/CHANGES index d58b64ba1..fc72c559d 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,12 @@ $ pip install --user --upgrade --pre libtmux +### Bug fix + +- {attr}`Server.attached_sessions` fix for when multiple clients attached, thank you @patrislav1 (#537) + + - #538 fix to `QueryList`. + ## libtmux 0.35.0 (2024-03-17) ### Breaking changes diff --git a/src/libtmux/server.py b/src/libtmux/server.py index d8ae64d9b..15a5fe0e4 100644 --- a/src/libtmux/server.py +++ b/src/libtmux/server.py @@ -260,7 +260,7 @@ def attached_sessions(self) -> t.List[Session]: ------- list of :class:`Session` """ - return [s for s in self.sessions if s.session_attached != "0"] + return self.sessions.filter(session_attached__noeq="1") def has_session(self, target_session: str, exact: bool = True) -> bool: """Return True if session exists.