mirror of
https://github.com/neovim/neovim.git
synced 2025-09-21 18:58:18 +00:00
IO: let 'fsync' option control more cases
Vim has the 'swapsync' option which we removed in 62d137ce09
.
Instead let 'fsync' control swapfile-fsync.
These cases ALWAYS force fsync (ignoring 'fsync' option):
- Idle (CursorHold).
- Exit caused by deadly signal.
- SIGPWR signal.
- Explicit :preserve command.
This commit is contained in:
@@ -2643,7 +2643,7 @@ void preserve_exit(void)
|
||||
if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) {
|
||||
mch_errmsg((uint8_t *)"Vim: preserving files...\n");
|
||||
ui_flush();
|
||||
ml_sync_all(false, false); // preserve all swap files
|
||||
ml_sync_all(false, false, true); // preserve all swap files
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user