diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index d391e19964..76317298dc 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -2536,8 +2536,8 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en goto fail; } - // Check if the timestamp hasn't changed since reading the file. - if (overwriting) { + // If 'forceit' is false, check if the timestamp hasn't changed since reading the file. + if (overwriting && !forceit) { retval = check_mtime(buf, &file_info_old); if (retval == FAIL) { goto fail; |