diff runtime/doc/eval.txt @ 12857:ffdf2e4b5d9a v8.0.1305

patch 8.0.1305: writefile() never calls fsync() commit https://github.com/vim/vim/commit/7567d0b115e332f61a9f390aaccdf7825b891227 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 16 23:04:15 2017 +0100 patch 8.0.1305: writefile() never calls fsync() Problem: Writefile() never calls fsync(). Solution: Follow the 'fsync' option with override to enable or disable.
author Christian Brabandt <cb@256bit.org>
date Thu, 16 Nov 2017 23:15:05 +0100
parents 963cdeb42c41
children 058e93aee621
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*	For Vim version 8.0.  Last change: 2017 Oct 28
+*eval.txt*	For Vim version 8.0.  Last change: 2017 Nov 16
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -8721,7 +8721,7 @@ winwidth({nr})						*winwidth()*
 		Examples: >
   :echo "The current window has " . winwidth(0) . " columns."
   :if winwidth(0) <= 50
-  :  exe "normal 50\<C-W>|"
+  :  50 wincmd |
   :endif
 <		For getting the terminal or screen size, see the 'columns'
 		option.
@@ -8762,8 +8762,17 @@ writefile({list}, {fname} [, {flags}])
 		appended to the file: >
 			:call writefile(["foo"], "event.log", "a")
 			:call writefile(["bar"], "event.log", "a")
-
-<		All NL characters are replaced with a NUL character.
+<
+		When {flags} contains "s" then fsync() is called after writing
+		the file.  This flushes the file to disk, if possible.  This
+		takes more time but avoids losing the file if the system
+		crashes.
+		When {flags} does not contain "S" or "s" then fsync is called
+		if the 'fsync' option is set.
+		When {flags} contains "S" then fsync() is not called, even
+		when 'fsync' is set.
+
+		All NL characters are replaced with a NUL character.
 		Inserting CR characters needs to be done before passing {list}
 		to writefile().
 		An existing file is overwritten, if possible.