aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-04-21 00:34:13 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-04-21 12:51:27 +0200
commit498731615c2f879c0b67323aba385c17a4a39d24 (patch)
tree0f0fbfa0a794b089718dd9c783fa7ea697639037 /src/nvim/ex_docmd.c
parenta02d22cca825f2c04381b40d50abfc7a15afec20 (diff)
downloadrneovim-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/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 7cd6dbdeca..7c857cde82 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -6547,18 +6547,14 @@ void alist_slash_adjust(void)
#endif
-/*
- * ":preserve".
- */
+/// ":preserve".
static void ex_preserve(exarg_T *eap)
{
curbuf->b_flags |= BF_PRESERVED;
- ml_preserve(curbuf, TRUE);
+ ml_preserve(curbuf, true, true);
}
-/*
- * ":recover".
- */
+/// ":recover".
static void ex_recover(exarg_T *eap)
{
/* Set recoverymode right away to avoid the ATTENTION prompt. */