From 587df594b884c3649b14c8f19dfbcee78e74a0a9 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 27 Jul 2024 10:38:08 +0900 Subject: Fix incompatibility of adaptive height and 'start:reload' This command would cause a deadlock and make fzf crash: fzf --bind 'start:reload:ls' --height ~100% Because, 1. 'start' event is handled by Terminal 2. When 'reload' is bound to 'start', fzf avoids starting the initial reader 3. Terminal waits for the initial input to find the right height when adaptive height is used 4. Because the initial reader is not started, Terminal never gets the initial list 5. No chance to trigger 'start:reload', hence deadlock This commit fixes the above problem by extracting the reload command bound to 'start' event and starting the initial reader with that command instead of letting Terminal start it. This commit also makes the environment variables available to $FZF_DEFAULT_COMMAND. FZF_DEFAULT_COMMAND='echo $FZF_QUERY' fzf --query foo Fix #3944 --- src/constants.go | 1 - 1 file changed, 1 deletion(-) (limited to 'src/constants.go') diff --git a/src/constants.go b/src/constants.go index 29874b29..980e1583 100644 --- a/src/constants.go +++ b/src/constants.go @@ -58,7 +58,6 @@ const ( const ( EvtReadNew util.EventType = iota EvtReadFin - EvtReadNone EvtSearchNew EvtSearchProgress EvtSearchFin -- cgit v1.2.3