Skip to content

fix: copy-mode support for edit and recent capture#136

Merged
laktak merged 2 commits intolaktak:masterfrom
KapJI:copy-mode
Mar 2, 2026
Merged

fix: copy-mode support for edit and recent capture#136
laktak merged 2 commits intolaktak:masterfrom
KapJI:copy-mode

Conversation

@KapJI
Copy link
Contributor

@KapJI KapJI commented Feb 19, 2026

Fixes two copy-mode issues:

  • edit now works when the target pane is in copy mode.
  • @extrakto_grab_area set to recent/window recent now captures the current copy-mode viewport, not the pane tail.

Implementation uses display-message formats (pane_in_mode, scroll_position, pane_height) to compute capture bounds.
I did not use capture-pane -M because it is only available in tmux 3.6+, while tmux 3.5a is still widely used. E.g. latest Debian Trixie has it.

@laktak
Copy link
Owner

laktak commented Mar 2, 2026

Thanks for your PR! I did not see any side effects, at least on my setup, so I'll merge it as it is.

The fallback is good even though I don't like that it eats all errors, making it impossible to diagnose any issues with it. I guess I'll add a debug switch if it is needed.

@laktak laktak merged commit 552e7c3 into laktak:master Mar 2, 2026
1 check passed
@KapJI KapJI deleted the copy-mode branch March 2, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants