diff --git a/CHANGES b/CHANGES index 9e92ccf64..ba12a1563 100644 --- a/CHANGES +++ b/CHANGES @@ -45,6 +45,13 @@ $ uvx --from 'libtmux' --prerelease allow python _Notes on the upcoming release will go here._ +### Fixes + +#### Flaky `test_capture_pane_flags[join_wrapped_numbers]` (#655) + +Marker detection now skips the shell command echo line to avoid +false-positive completion. + ## libtmux 0.58.0 (2026-05-23) libtmux 0.58.0 fixes subprocess output decoding on non-UTF-8 locales. diff --git a/tests/test_pane_capture_pane.py b/tests/test_pane_capture_pane.py index 5111a0670..0ca89fb4d 100644 --- a/tests/test_pane_capture_pane.py +++ b/tests/test_pane_capture_pane.py @@ -356,10 +356,12 @@ def prompt_ready() -> bool: full_command = f'{command}; echo "{marker}"' pane.send_keys(full_command, literal=False, suppress_history=False) - # Wait for marker to appear + # Wait for marker to appear as command output (not in the command echo line) def command_complete() -> bool: - output = "\n".join(pane.capture_pane()) - return marker in output + lines = pane.capture_pane() + return any( + marker in line and not line.lstrip().startswith("$") for line in lines + ) retry_until(command_complete, 5, raises=True)