Skip to content
Myr

Printable character in --expect set should not affect --print-query

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 1854922 · Browse files · 2 files+12 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+12 added−2 removed

  • tests:+9 added−0 removed
  • other:+3 added−2 removed

2 files+12 added−2 removed

modified:src/terminal.go+3 added-2 removed
1077 unmodified lines
1078 }1079 for key, ret := range t.expect {1080 if keyMatch(key, event) {1081 t.pressed = ret1082 req(reqClose)1083 break1082 t.reqBox.Set(reqClose, nil)1083 t.mutex.Unlock()1084 return1085 }1086 }10871088 var doAction func(actionType, int) bool
328 unmodified lines
modified:test/test_go.rb+9 added
450 unmodified lines
451 tmux.send_keys :Escape, :z452 assert_equal ['55', 'alt-z', '55'], readonce.split($/)453 end454455 def test_expect_printable_character_print_query456 tmux.send_keys "seq 1 100 | #{fzf '--expect=z --print-query'}", :Enter457 tmux.until { |lines| lines[-2].include? '100/100' }458 tmux.send_keys '55'459 tmux.until { |lines| lines[-2].include? '1/100' }460 tmux.send_keys 'z'461 assert_equal ['55', 'z', '55'], readonce.split($/)462 end463464 def test_expect_print_query_select_1465 tmux.send_keys "seq 1 100 | #{fzf '-q55 -1 --expect=alt-z --print-query'}", :Enter466 assert_equal ['55', '', '55'], readonce.split($/)467 end
1088 unmodified lines