mirror of
https://github.com/junegunn/fzf.git
synced 2026-07-10 18:46:30 +08:00
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:
@@ -177,6 +177,12 @@ class Tmux
|
||||
system('tmux', 'setb', str, ';', 'pasteb', '-t', win, ';', 'send-keys', '-t', win, 'Enter')
|
||||
end
|
||||
|
||||
# Paste with bracketed paste control codes so fzf sees
|
||||
# bracketed-paste-begin/end around the content
|
||||
def paste_bracketed(str)
|
||||
system('tmux', 'setb', str, ';', 'pasteb', '-p', '-t', win)
|
||||
end
|
||||
|
||||
def capture
|
||||
go(%W[capture-pane -p -J -t #{win}]).map(&:rstrip).reverse.drop_while(&:empty?).reverse
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user