mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +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:
@@ -145,7 +145,7 @@ static void on_signal(SignalWatcher *handle, int signum, void *data)
|
||||
case SIGPWR:
|
||||
// Signal of a power failure(eg batteries low), flush the swap files to
|
||||
// be safe
|
||||
ml_sync_all(false, false);
|
||||
ml_sync_all(false, false, true);
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGPIPE
|
||||
|
Reference in New Issue
Block a user