mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-22 12:55:17 +00:00
Printable character in --expect set should not affect --print-query
This commit is contained in:
parent
1854922f0c
commit
401a5fd5ff
@ -1079,8 +1079,9 @@ func (t *Terminal) Loop() {
|
|||||||
for key, ret := range t.expect {
|
for key, ret := range t.expect {
|
||||||
if keyMatch(key, event) {
|
if keyMatch(key, event) {
|
||||||
t.pressed = ret
|
t.pressed = ret
|
||||||
req(reqClose)
|
t.reqBox.Set(reqClose, nil)
|
||||||
break
|
t.mutex.Unlock()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,6 +452,15 @@ class TestGoFZF < TestBase
|
|||||||
assert_equal ['55', 'alt-z', '55'], readonce.split($/)
|
assert_equal ['55', 'alt-z', '55'], readonce.split($/)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_expect_printable_character_print_query
|
||||||
|
tmux.send_keys "seq 1 100 | #{fzf '--expect=z --print-query'}", :Enter
|
||||||
|
tmux.until { |lines| lines[-2].include? '100/100' }
|
||||||
|
tmux.send_keys '55'
|
||||||
|
tmux.until { |lines| lines[-2].include? '1/100' }
|
||||||
|
tmux.send_keys 'z'
|
||||||
|
assert_equal ['55', 'z', '55'], readonce.split($/)
|
||||||
|
end
|
||||||
|
|
||||||
def test_expect_print_query_select_1
|
def test_expect_print_query_select_1
|
||||||
tmux.send_keys "seq 1 100 | #{fzf '-q55 -1 --expect=alt-z --print-query'}", :Enter
|
tmux.send_keys "seq 1 100 | #{fzf '-q55 -1 --expect=alt-z --print-query'}", :Enter
|
||||||
assert_equal ['55', '', '55'], readonce.split($/)
|
assert_equal ['55', '', '55'], readonce.split($/)
|
||||||
|
Loading…
Reference in New Issue
Block a user