aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-04-21 00:28:53 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-04-21 12:50:28 +0200
commita02d22cca825f2c04381b40d50abfc7a15afec20 (patch)
tree94a813bf6fcdf9bb835becbfc2dd5d34fadb6f6b /src
parentfe5f38d8bd54248e4ea327a7f6ca52646799f3a4 (diff)
downloadrneovim-a02d22cca825f2c04381b40d50abfc7a15afec20.tar.gz
rneovim-a02d22cca825f2c04381b40d50abfc7a15afec20.tar.bz2
rneovim-a02d22cca825f2c04381b40d50abfc7a15afec20.zip
IO: shada should respect 'fsync' option
shada_write_file() is called on exit (:quit and friends), this can be very slow. Note: AFAICT Vim (do_viminfo()) does not appear to fsync() viminfo.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/event/process.c2
-rw-r--r--src/nvim/shada.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/event/process.c b/src/nvim/event/process.c
index 23433cf495..f82614e7a1 100644
--- a/src/nvim/event/process.c
+++ b/src/nvim/event/process.c
@@ -265,7 +265,7 @@ static void process_close_event(void **argv)
if (proc->type == kProcessTypePty) {
xfree(((PtyProcess *)proc)->term_name);
}
- if (proc->cb) {
+ if (proc->cb) { // "on_exit" for jobstart(). See channel_job_start().
proc->cb(proc, proc->status, proc->data);
}
}
diff --git a/src/nvim/shada.c b/src/nvim/shada.c
index 15ac28e1bf..f4454504a4 100644
--- a/src/nvim/shada.c
+++ b/src/nvim/shada.c
@@ -811,7 +811,7 @@ static int open_shada_file_for_reading(const char *const fname,
/// Wrapper for closing file descriptors
static void close_file(void *cookie)
{
- const int error = file_free(cookie, true);
+ const int error = file_free(cookie, !!p_fs);
if (error != 0) {
emsgf(_(SERR "System error while closing ShaDa file: %s"),
os_strerror(error));