diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-04-21 00:34:13 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-04-21 12:51:27 +0200 |
commit | 498731615c2f879c0b67323aba385c17a4a39d24 (patch) | |
tree | 0f0fbfa0a794b089718dd9c783fa7ea697639037 /src/nvim/os/signal.c | |
parent | a02d22cca825f2c04381b40d50abfc7a15afec20 (diff) | |
download | rneovim-498731615c2f879c0b67323aba385c17a4a39d24.tar.gz rneovim-498731615c2f879c0b67323aba385c17a4a39d24.tar.bz2 rneovim-498731615c2f879c0b67323aba385c17a4a39d24.zip |
IO: let 'fsync' option control more cases
Vim has the 'swapsync' option which we removed in 62d137ce0969.
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.
Diffstat (limited to 'src/nvim/os/signal.c')
-rw-r--r-- | src/nvim/os/signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/os/signal.c b/src/nvim/os/signal.c index 732be072e1..fc7f9cefd1 100644 --- a/src/nvim/os/signal.c +++ b/src/nvim/os/signal.c @@ -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 |