Skip to content

A file is considered modified even if contents are the same as before any modifications #11296

Discussion options

You must be logged in to vote

Our behavior matches NeoVim, Kakoune and VSCode. We don't do what you propose for the same reason as the other editors: it's expensive. In order to reset the modification indicator when the buffer matches the underlying file you need to compare the buffer to on-disk contents per change which is very wasteful resource-wise regardless of file size, but especially for large files. #4994 is about using file system notifications to rerun the diff detection (via gix). Even if you used file-system notifications to detect when the underlying file changed you would need to keep a copy of the file in memory for comparisons.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@jakubkaczor
Comment options

@the-mikedavis
Comment options

Answer selected by jakubkaczor
@jakubkaczor
Comment options

@the-mikedavis
Comment options

@jakubkaczor
Comment options

@the-mikedavis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R-wontfix Not planned: Won't fix
3 participants
Converted from issue

This discussion was converted from issue #11290 on July 24, 2024 08:33.