Skip to content
Myr

Fix 'reload' not terminating closed standard input stream

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

Fix #3750

authored by Junegunn Choi · committed by Junegunn Choi · parent 4ab7fdc · Browse files · 2 files+6 added−1 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+6 added−1 removed

  • tests:+5 added−0 removed
  • other:+1 added−1 removed

2 files+6 added−1 removed

modified:src/reader.go+1 added-1 removed
145 unmodified lines
146 }147 }148149 // We're not making any progress after 100 tries. Stop.150 if n == 0 && err == nil {150 if n == 0 {151 break152 }153154 buf := slab[:n]
107 unmodified lines
modified:test/test_go.rb+5 added
1953 unmodified lines
1954 tmux.send_keys :Space1955 tmux.until { |lines| assert_equal 10, lines.item_count }1956 end19571958 def test_reload_should_terminate_stadard_input_stream1959 tmux.send_keys %(ruby -e "STDOUT.sync = true; loop { puts 1; sleep 0.1 }" | fzf --bind 'start:reload(seq 100)'), :Enter1960 tmux.until { |lines| assert_equal 100, lines.item_count }1961 end19621963 def test_clear_list_when_header_lines_changed_due_to_reload1964 tmux.send_keys %(seq 10 | #{FZF} --header 0 --header-lines 3 --bind 'space:reload(seq 1)'), :Enter1965 tmux.until { |lines| assert_includes lines, ' 9' }1966 tmux.send_keys :Space
1787 unmodified lines