Skip to content

Update preview window after reload #2644

Closed

Description

@edi9999
  • I have read through the manual page (man fzf)
  • I have the latest version of fzf
  • I have searched through the existing issues

Info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

Problem / Steps to reproduce

I have a script that is using "reload()", which ultimately changes the line under the cursor.
However, the preview window doesn't change.

Here is a script that makes it possible to reproduce the issue (in bash) :

fzf < <(printf "1\n2\n3\n") --bind "ctrl-t:reload(printf '4')" --preview 'echo {}' --preview-window 'nohidden'

When I hit ctrl-t, the content of the main fzf view is updated to be only "4", but the preview still uses the item selected before the reload.

Activity

  1. edi9999 commented on Oct 22, 2021

    @edi9999
    ContributorAuthor

    I think this might be a regression, I see I'm using the latest version (0.27.3).

    I think this was working in the past, maybe the bug was introduced in some recent release.

  2. added
    bug
    on Oct 22, 2021
  3. junegunn commented on Oct 22, 2021

    @junegunn
    Owner

    You're right. This was caused by 0f02fc0.

  4. self-assigned this
    on Oct 22, 2021
  5. added a commit that references this issue on Feb 3, 2024
    97ae8af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions