mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
vim-patch:8.2.3509: undo file is not synced (#23371)
Problem: Undo file is not synced. (Sami Farin)
Solution: Sync the undo file if 'fsync' is set. (Christian Brabandt,
closes vim/vim#8879, closes vim/vim#8920)
340dd0fbe4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -1333,6 +1333,10 @@ void u_write_undo(const char *const name, const bool forceit, buf_T *const buf,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (p_fs && fflush(fp) == 0 && os_fsync(fd) != 0) {
|
||||
write_ok = false;
|
||||
}
|
||||
|
||||
write_error:
|
||||
fclose(fp);
|
||||
if (!write_ok) {
|
||||
|
Reference in New Issue
Block a user