Skip to content

Commit c3b47e9

Browse files
committed
docs(pane_tools): Restore _read_history_limit platform quirk and caching notes
why: the multi-line docstring documenting the tmux 3.7+ retroactive history-limit quirk, caching invariant, and separation rationale was stripped to a one-liner during the state.py extraction.
1 parent 8b35863 commit c3b47e9

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • src/libtmux_mcp/tools/pane_tools

src/libtmux_mcp/tools/pane_tools/state.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,15 @@ def _raise_if_pane_lifecycle_changed(
6666

6767

6868
def _read_history_limit(pane: Pane) -> int:
69-
"""Read the pane's ``history-limit`` once."""
69+
"""Read the pane's ``history-limit`` once.
70+
71+
Fixed at pane creation — a retroactive ``set-option history-limit``
72+
only takes effect in tmux 3.7+ (commit ``e7b1575``); older versions
73+
require a new pane. Safe to cache for the lifetime of a single
74+
wait or capture operation. Kept separate from :func:`_read_pane_state`
75+
so per-tick reads do not pay for a value that never changes between
76+
ticks.
77+
"""
7078
stdout = pane.display_message("#{history_limit}", get_text=True)
7179
raw = stdout[0] if stdout else "0"
7280
return int(raw)

0 commit comments

Comments
 (0)