Skip to content

Commit 0a071d3

Browse files
committed
Pane(fix[display_popup]): correct border_style flag and add style param
why: display_popup mapped border_style to -s but tmux uses -S for border-style and -s for general popup style. This matched the wrong tmux flag and left the style parameter inaccessible. what: - Change border_style flag from -s to -S - Add style parameter mapped to -s - Update docstring to reflect correct flag mappings
1 parent 00c13b5 commit 0a071d3

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/libtmux/pane.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ def display_popup(
11541154
start_directory: StrPath | None = None,
11551155
title: str | None = None,
11561156
border_lines: str | None = None,
1157+
style: str | None = None,
11571158
border_style: str | None = None,
11581159
environment: dict[str, str] | None = None,
11591160
) -> None:
@@ -1185,8 +1186,10 @@ def display_popup(
11851186
Popup title (``-T`` flag). Requires tmux 3.3+.
11861187
border_lines : str, optional
11871188
Border line style (``-b`` flag). Requires tmux 3.3+.
1189+
style : str, optional
1190+
Popup style (``-s`` flag). Requires tmux 3.3+.
11881191
border_style : str, optional
1189-
Border style (``-s`` flag). Requires tmux 3.3+.
1192+
Border style (``-S`` flag). Requires tmux 3.3+.
11901193
environment : dict, optional
11911194
Environment variables (``-e`` flag). Requires tmux 3.3+.
11921195
@@ -1247,9 +1250,18 @@ def display_popup(
12471250
stacklevel=2,
12481251
)
12491252

1253+
if style is not None:
1254+
if has_gte_version("3.3", tmux_bin=self.server.tmux_bin):
1255+
tmux_args += ("-s", style)
1256+
else:
1257+
warnings.warn(
1258+
"style requires tmux 3.3+, ignoring",
1259+
stacklevel=2,
1260+
)
1261+
12501262
if border_style is not None:
12511263
if has_gte_version("3.3", tmux_bin=self.server.tmux_bin):
1252-
tmux_args += ("-s", border_style)
1264+
tmux_args += ("-S", border_style)
12531265
else:
12541266
warnings.warn(
12551267
"border_style requires tmux 3.3+, ignoring",

0 commit comments

Comments
 (0)