From 31cdb227ba60e8867b3cb8e60ae8215290dd85a4 Mon Sep 17 00:00:00 2001 From: ZyX Date: Thu, 23 Feb 2017 01:49:05 +0300 Subject: [PATCH] eval: Flush buffer in write_list This way success/failure return from this function is more precise. --- src/nvim/eval.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d9da5346e3..61ed815391 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -18069,6 +18069,9 @@ static bool write_list(FileDescriptor *const fp, const list_T *const list, } } } + if ((error = file_fsync(fp)) != 0) { + goto write_list_error; + } return true; write_list_error: emsgf(_("E80: Error while writing: %s"), os_strerror(error));