mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00: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:
@@ -265,7 +265,7 @@ static void process_close_event(void **argv)
|
|||||||
if (proc->type == kProcessTypePty) {
|
if (proc->type == kProcessTypePty) {
|
||||||
xfree(((PtyProcess *)proc)->term_name);
|
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);
|
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
|
/// Wrapper for closing file descriptors
|
||||||
static void close_file(void *cookie)
|
static void close_file(void *cookie)
|
||||||
{
|
{
|
||||||
const int error = file_free(cookie, true);
|
const int error = file_free(cookie, !!p_fs);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
emsgf(_(SERR "System error while closing ShaDa file: %s"),
|
emsgf(_(SERR "System error while closing ShaDa file: %s"),
|
||||||
os_strerror(error));
|
os_strerror(error));
|
||||||
|
Reference in New Issue
Block a user