aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-04-03 03:54:34 +0200
committerGitHub <noreply@github.com>2017-04-03 03:54:34 +0200
commit6afa7d66cd6343c7c0114e6b3e08c592e169df43 (patch)
treeb9bf75bedadd6a00347cd9f4396d159562fb7675 /runtime
parentddfa0359c638a4fd5eba5c339dc3e18e2b8aca35 (diff)
parentae7d8d8ffb86eefa45d8f59834eb0f088e93535d (diff)
downloadrneovim-6afa7d66cd6343c7c0114e6b3e08c592e169df43.tar.gz
rneovim-6afa7d66cd6343c7c0114e6b3e08c592e169df43.tar.bz2
rneovim-6afa7d66cd6343c7c0114e6b3e08c592e169df43.zip
Merge #6427 from ZyX-I/writefile-allow-omitting-fsync
eval: Make writefile() able to disable fsync()
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt6
-rw-r--r--runtime/doc/options.txt3
2 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 9a86e13d95..7060cc4186 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -7915,6 +7915,12 @@ writefile({list}, {fname} [, {flags}])
appended to the file: >
:call writefile(["foo"], "event.log", "a")
:call writefile(["bar"], "event.log", "a")
+<
+ When {flags} contains "S" fsync() call is not used, with "s"
+ it is used, 'fsync' option applies by default. No fsync()
+ means that writefile() will finish faster, but writes may be
+ left in OS buffers and not yet written to disk. Such changes
+ will disappear if system crashes before OS does writing.
All NL characters are replaced with a NUL character.
Inserting CR characters needs to be done before passing {list}
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 394e38f6e5..eedb7ce34d 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2740,6 +2740,9 @@ A jump table for the options with a short description can be found at |Q_op|.
mode, so it may be undesirable in some situations. Be warned that
turning this off increases the chances of data loss after a crash.
+ Currently applies only to writing the buffer with e.g. |:w| and
+ |writefile()|.
+
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
'gdefault' 'gd' boolean (default off)
global