Skip to content

bug: explorer doesn't always update its git status icon if the state changes outside of the explorer #1630

Description

@nickjj

Did you check docs and existing issues?

  • I have read all the snacks.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of snacks.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.10.4

Operating system/version

Ubuntu 22.04

Describe the bug

If you modify files in a git repo, the explorer puts nice icon indicators to let you know the state of the file. If you commit changes with the git cli directly or use a tool like gitui to commit files then the explorer will show an icon that a file was changed and this only goes away after closing + opening the explorer or individually saving the associated file in Neovim even if the contents didn't change.

Here's a screenshot where I used the git CLI to commit changes to a few files:

Image

This occurs even when using gitui that was invoked directly inside of Neovim such as when using LazyVim which optionally sets things up to use it within Neovim in a floating window.

With that said, in a way it's almost a feature to know that the state of a file changed externally and now you need to take an action to clear it so feel free to close this if that behavior is intended.

Steps To Reproduce

  1. Create a git repo
  2. Add files and commit files
  3. Open Neovim
  4. Toggle the explorer open
  5. Modify one of the files and save it
  6. Use the git CLI to create the commit
  7. Notice the icon in the explorer window next to the file
  8. Save the file in Neovim even with no changes
  9. Notice the icon in the explorer window goes away

Expected Behavior

Steps 7 and 8 in the above workflow wouldn't be needed to get the explorer to reflect the state of the file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleThis issue or PR has been inactive for a while

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions