Skip to content

Allow disabling coordinator delay #4364

Closed
@alex-huff

Description

@alex-huff

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.61 (devel)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

I am implementing a window switcher (similar to alt+tab on windows) using fzf and to reduce latency I am using a single kitty/fzf instance instead of creating a new one every time. Whenever I show the window switcher I need to tell fzf to reload it's input using the HTTP server. The problem is that kitty/fzf instantly becomes visible but fzf takes ~100ms to display the reloaded input. This is pretty jarring. I found that disabling this sleep fixed my issue.

fzf/src/core.go

Lines 510 to 515 in d24b58e

if delay && reading {
dur := util.DurWithin(
time.Duration(ticks)*coordinatorDelayStep,
0, coordinatorDelayMax)
time.Sleep(dur)
}

Sadly there is no way to configure this delay using the command line interface.

Before disabling:

fzf-delay-an.mp4

After disabling:

fzf-nodelay-an.mp4

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions