mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 00:03:39 -05:00
Revert "Add GET endpoints for getting the state of the finder"
This reverts commit 750b2a6313.
This can cause a deadlock if the endpoints are accessed in the core event
loop via execute action.
fzf --listen 6266 --bind 'space:execute:curl localhost:6266'
Technically, there's no reason to use the API because the information is
already available via `{}` and `{q}`, but I'd like to completely remove
the risk of misuse.
This commit is contained in:
@@ -2440,12 +2440,9 @@ class TestGoFZF < TestBase
|
||||
def test_listen
|
||||
tmux.send_keys 'seq 10 | fzf --listen 6266', :Enter
|
||||
tmux.until { |lines| assert_equal 10, lines.item_count }
|
||||
Net::HTTP.post(URI('http://localhost:6266'), 'change-query(00)+reload(seq 100)+change-prompt:hundred> ')
|
||||
Net::HTTP.post(URI('http://localhost:6266'), 'change-query(yo)+reload(seq 100)+change-prompt:hundred> ')
|
||||
tmux.until { |lines| assert_equal 100, lines.item_count }
|
||||
tmux.until { |lines| assert_equal 'hundred> 00', lines[-1] }
|
||||
assert_equal '100', Net::HTTP.get(URI('http://localhost:6266'))
|
||||
assert_equal '100', Net::HTTP.get(URI('http://localhost:6266/current'))
|
||||
assert_equal '00', Net::HTTP.get(URI('http://localhost:6266/query'))
|
||||
tmux.until { |lines| assert_equal 'hundred> yo', lines[-1] }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user