Skip to content

Commit ee8a705

Browse files
committed
chore(Pane,Window): Fix .cmd() -t wrapper for integer set_option() values
1 parent db775fc commit ee8a705

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libtmux/pane.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def cmd(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
113113
Specifying ``('-t', 'custom-target')`` or ``('-tcustom_target')`` in
114114
``args`` will override using the object's ``pane_id`` as target.
115115
"""
116-
if not any(arg.startswith("-t") for arg in args):
116+
if not any("-t" in str(x) for x in args):
117117
args = ("-t", self.pane_id, *args)
118118

119119
return self.server.cmd(cmd, *args, **kwargs)

src/libtmux/window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def cmd(self, cmd: str, *args: t.Any, **kwargs: t.Any) -> tmux_cmd:
139139
Specifying ``('-t', 'custom-target')`` or ``('-tcustom_target')`` in
140140
``args`` will override using the object's ``window_id`` as target.
141141
"""
142-
if not any(arg.startswith("-t") for arg in args):
142+
if not any("-t" in str(x) for x in args):
143143
args = ("-t", self.window_id, *args)
144144

145145
return self.server.cmd(cmd, *args, **kwargs)

0 commit comments

Comments
 (0)