mirror of
https://github.com/neovim/neovim.git
synced 2024-12-27 14:21:31 -07:00
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.
This commit is contained in:
parent
fe5f38d8bd
commit
a02d22cca8
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user