mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Add spec to demonstrate bracketed-paste-magic bug workaround
Add `bracketed-paste` to list of widgets that clear the suggestion as a workaround for GitHub #351
This commit is contained in:
parent
e7c7efe2e2
commit
ce6ee94f30
1 changed files with 16 additions and 0 deletions
|
@ -24,4 +24,20 @@ describe 'pasting using bracketed-paste-magic' do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with `bracketed-paste` added to the list of widgets that clear the suggestion' do
|
||||
let(:options) { ['ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)'] }
|
||||
|
||||
it 'does not retain an old suggestion' do
|
||||
with_history ('echo foo') do
|
||||
session.send_string('echo ')
|
||||
wait_for { session.content }.to eq('echo foo')
|
||||
session.paste_string('bar')
|
||||
wait_for { session.content }.to eq('echo bar')
|
||||
session.send_keys('C-a') # Any cursor movement works
|
||||
sleep 1
|
||||
expect(session.content).to eq('echo bar')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue