Clear the suggestion on copy-earlier-word

This commit is contained in:
Henré Botha 2019-06-14 17:48:31 +02:00
parent 733abd4af0
commit a58225154f
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,20 @@
describe '`copy-earlier-word`' do
let(:before_sourcing) do
-> do
session.
run_command('autoload -Uz copy-earlier-word').
run_command('zle -N copy-earlier-word').
send_string('bindkey "').
send_keys('C-n').
send_string('" copy-earlier-word').
send_keys('enter')
end
end
it 'should copy the first word' do
session.clear_screen
session.send_string('foo bar baz')
3.times { session.send_keys('C-n') }
wait_for { session.content }.to eq('foo bar bazfoo')
end
end

View File

@ -35,6 +35,7 @@ typeset -g ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX=autosuggest-orig-
up-line-or-history up-line-or-history
down-line-or-history down-line-or-history
accept-line accept-line
copy-earlier-word
) )
} }

View File

@ -71,6 +71,7 @@ typeset -g ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX=autosuggest-orig-
up-line-or-history up-line-or-history
down-line-or-history down-line-or-history
accept-line accept-line
copy-earlier-word
) )
} }