Rename FZF_IDLE_TIME to FZF_IDLE_MS

Seconds resolution is too coarse to combine with sub-second every()
bindings. Switching to milliseconds gives idle-based scripts useful
resolution at any every() interval.
This commit is contained in:
Junegunn Choi
2026-05-16 18:11:26 +09:00
parent 07f3b00bd4
commit 4364dc1d24
4 changed files with 14 additions and 12 deletions
+4 -3
View File
@@ -1431,9 +1431,10 @@ class TestCore < TestInteractive
assert_includes tmux.capture[-3], 'STOPPED'
end
def test_fzf_idle_time_env
# FZF_IDLE_TIME, combined with every(), implements idle-based behavior.
tmux.send_keys %(seq 100 | fzf --bind 'every(0.5):transform-header(echo "idle=$FZF_IDLE_TIME")'), :Enter
def test_fzf_idle_ms_env
# FZF_IDLE_MS, combined with every(), implements idle-based behavior.
# Print seconds derived from milliseconds for stable assertions.
tmux.send_keys %(seq 100 | fzf --bind 'every(0.2):transform-header(echo "idle=$((FZF_IDLE_MS / 1000))")'), :Enter
tmux.until { |lines| assert_equal 100, lines.match_count }
# Idle counter advances without any input
tmux.until { |lines| assert_includes lines[-3], 'idle=1' }