Skip to content

[BUG] Reveal file does not work #105

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

Closed
levouh opened this issue Jan 29, 2022 · 8 comments
Closed

[BUG] Reveal file does not work #105

levouh opened this issue Jan 29, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@levouh
Copy link
Contributor

levouh commented Jan 29, 2022

See below:

neo-tree-reaveal-file-bug.mp4

where the steps to reproduce would be:

  1. Open a file
  2. Use :NeoTreeReveal
  3. Observe that the correct file is not revealed, and instead the tree is simply shrunk

This was introduced via 4787b637895fccfedb813c9bf8926453f187c2e8, as the same action works (meaning the tree properly focuses the current file) on 751ee6b4e840d36915ab5ac7234e848aa45db1ac.

@cseickel
Copy link
Contributor

I'm not seeing the same issue. Are you currently on the latest release, which is 517cf66?

Can you paste your config here?

@cseickel cseickel added the bug Something isn't working label Jan 29, 2022
@levouh
Copy link
Contributor Author

levouh commented Jan 29, 2022

I am using 59d22bbc767a16ebce4d706e9b5e4be350be9278, and it happens for me when using a minimal configuration like:

vim.opt.runtimepath = { vim.env.VIMRUNTIME }

vim.cmd([[
  packadd plenary.nvim
  packadd nui.nvim
  packadd neo-tree.nvim
]])

require("neo-tree").setup({})

and then running nvim --noplugin -u /tmp/neo-tree.lua (assuming the file above is at the path mentioned here). :e a path in the same directory as where you ran nvim, and run :NeoTreeReveal.

@cseickel
Copy link
Contributor

Thanks, I see it now. I am pretty sure the first invocation works but the second invocation is messing it up by not having the correct folders open.

@cseickel
Copy link
Contributor

@levouh Can you try the latest in main and let me know if it works correctly?

@nyngwang
Copy link

nyngwang commented Feb 12, 2022

I think this problem still exists.

reveal_bug.mov

Info

NVIM version

NVIM v0.7.0-dev+1068-g7db0aa027
Build type: Release
LuaJIT 2.1.0-beta3

command used

NeoTreeFloatToggle

config

Part of:

      require('neo-tree').setup {
        open_files_in_last_window = true, -- move cursor correctly on close.
        enable_git_status = true,
        filesystem = {
          follow_current_file = true,
          filters = {
            show_hidden = true,
            respect_gitignore = false
          },

when

Usually happen after all packages get updated via packer.nvim (while don't restart the session) / files are created / files are removed via neo-tree.

@cseickel
Copy link
Contributor

Usually happen after all packages get updated via packer.nvim (while don't restart the session)

That was the missing detail I needed! I found the bug and am fixing it now.

@cseickel cseickel reopened this Feb 13, 2022
@cseickel
Copy link
Contributor

cseickel commented Feb 13, 2022

@nyngwang I think this is fixed now in main.

@nyngwang
Copy link

nyngwang commented Feb 13, 2022

That was the missing detail I needed! [...]

@cseickel Lol, I thought this info was not important days ago so I didn't provide it. Let me check it now!

update: It works. I think we can close this for now (I replied in another thread too.)

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

3 participants