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

file_previewer stale for directories after creating/moving files #2414

Open
jamestrew opened this issue Mar 4, 2023 · 0 comments
Open

file_previewer stale for directories after creating/moving files #2414

jamestrew opened this issue Mar 4, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jamestrew
Copy link
Contributor

Description

This is primarily a downstream telescope-file-browser issue.

Currently, from what I can tell, the file_previewer previewer caches buffer numbers in a local variable called bufname_table inside telescope.previewers.buffer_previewer.new_buffer_previewer.
This applies mostly to directories when using telescope-file-browser but when files are created/moved into a directory while the picker is active and the preview for that directory path is already cached, the previewer shows the cached preview which is now stale.

I'm wondering if it's feasible to expose bufname_table as part of the previewer's state (picker.previewer.state.bufname_table) so that we can manipulate this cache downstream on certain actions.

Open for discussion and willing to submit a PR.

Neovim version

details in the above linked issue

Operating system and version

details in the above linked issue

Telescope version / branch / rev

details in the above linked issue

checkhealth telescope

telescope: require("telescope.health").check()

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- OK fd: found fd 8.6.0

Steps to reproduce

details in the above linked issue

Expected behavior

No response

Actual behavior

details in the above linked issue

Minimal config

details in the above linked issue
@jamestrew jamestrew added the bug Something isn't working label Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant