Skip to content

Bug: buffer not refreshed after discarding entire file #564

Description

@ivfiev

When reverting entire file from inside a codediff tabpage, the underlying file is correctly updated on disk. However, after leaving the codediff tabpage and returning to the regular buffer, the buffer still shows the old contents.

Running:

:checktime

causes the buffer to immediately reload and show the reverted contents.

Steps to reproduce

  1. Open a modified file in Neovim.
  2. Open it in codediff.
  3. Discard whole file changes from the codediff tabpage.
  4. Return to the regular buffer for that file.
  5. The buffer still shows the contents from before the revert.
  6. Run :checktime.
  7. The buffer updates to the correct contents.

Expected behavior

After reverting changes through codediff, an existing buffer for the affected file should reflect the updated contents without requiring a manual :checktime.

For comparison, reverting the same file externally (e.g. through Lazygit in another terminal) is picked up automatically by Neovim and the buffer reloads as expected.

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

    Type/BugSomething isn't working correctly

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions