Pass bracketed paste actions through wait/track block

A pasted character firing a wait-arming binding swallowed the
subsequent bracketed-paste-end, leaving t.pasting set forever and
suppressing queryChanged for all later input. Let paste begin/end
through the block so pasting state is maintained and the search for
the edited query is dispatched.
This commit is contained in:
Junegunn Choi
2026-07-03 08:57:17 +09:00
parent ea017a2e1f
commit 4e43842640
3 changed files with 24 additions and 2 deletions
+14
View File
@@ -1234,6 +1234,20 @@ class TestCore < TestInteractive
tmux.until { |lines| assert_equal '> 5', lines[-3] }
end
def test_wait_action_bracketed_paste
# A wait armed by a binding fired from a pasted character must not break
# bracketed paste handling: paste-end passes through the block so
# t.pasting is cleared and the pending search is dispatched
tmux.send_keys %(seq 100 | #{FZF} --bind 'a:put(a)+wait+first'), :Enter
tmux.until { |lines| assert_equal 100, lines.match_count }
tmux.paste_bracketed('1a2')
# Search for the edited query must run; blocked forever before the fix
tmux.until { |lines| assert_equal 0, lines.match_count }
# Filtering must still work afterwards
tmux.send_keys 'C-u', '55'
tmux.until { |lines| assert_equal 1, lines.match_count }
end
def test_track_blocked_bg_transform
# A bg-transform result completing while track-blocked is applied, not
# dropped. The header must show while '+T*' is still displayed.