Skip to content

fix: use SIGWINCH to force fzf to redraw screen #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phanen
Copy link
Contributor

@phanen phanen commented Mar 19, 2025

Since I bind my ctrl-l to other actions rather than clear-screen so
I spot this upsteram bug again bdc2a4e.
resize can trigger clear-screen in fzf. So this might be a better
way to force redraw in linux.

Related:

  • By resize there's false positive: e.g. windows manager users may
    often resize window manualy
    • And I'm not sure SIGWINCH and fzf's resize work correctly on
      Windows.
  • By chan_send/feedkeys we override user's key bindings (although
    there's already some chan_send hacks in codebase like: toggling
    preview (this is handled better by scanning user's fzf bindings
    config... but will be weird if user set bindings from
    FZF_DEFAULT_OPTS), mirroring the esc to fzf (this is opt-in by a
    hide profile).

Since I bind my `ctrl-l` to other actions rather than `clear-screen` so
I spot this upsteram bug again
kevinhwang91@bdc2a4e.
`resize` can trigger `clear-screen` in fzf. So this might be a better
way to force `redraw` in linux.

Related:
* ibhagwan/fzf-lua#1871
*
ibhagwan/fzf-lua#1901 (reply in thread)
> * By `resize` there's false positive: e.g. windows manager users may
often resize window manualy
>   * And I'm not sure `SIGWINCH` and fzf's `resize` work correctly on
Windows.
> * By `chan_send`/`feedkeys` we override user's key bindings (although
there's already some `chan_send` hacks in codebase like: toggling
preview (this is handled better by scanning user's fzf bindings
config... but will be weird if user set bindings from
`FZF_DEFAULT_OPTS`), mirroring the `esc` to fzf (this is opt-in by a
hide profile).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant