Skip to content
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

Update preview window after reload #2644

Closed
5 of 10 tasks
edi9999 opened this issue Oct 22, 2021 · 2 comments
Closed
5 of 10 tasks

Update preview window after reload #2644

edi9999 opened this issue Oct 22, 2021 · 2 comments
Assignees
Labels

Comments

@edi9999
Copy link
Contributor

edi9999 commented Oct 22, 2021

  • 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.

@edi9999
Copy link
Contributor Author

edi9999 commented Oct 22, 2021

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.

@junegunn junegunn added the bug label Oct 22, 2021
@junegunn
Copy link
Owner

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

@junegunn junegunn self-assigned this Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants