summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2018-07-04 09:55:05 +0300
committerFrank LENORMAND <lenormf@gmail.com>2018-07-04 09:55:05 +0300
commitab2eade28da2acbbb5b58cd0379c7a138da77101 (patch)
tree52a6acaa7b3c05b9d16fabfa105ea56673005c51
parent5309b7b5e53c6d742a779bc82dcafe815de0dd56 (diff)
rc: Synchronize important file writes
Fixes #2178
-rw-r--r--rc/base/lint.kak2
-rw-r--r--rc/base/spell.kak2
-rw-r--r--rc/core/formatter.kak2
-rw-r--r--rc/extra/clang.kak2
-rw-r--r--rc/extra/jedi.kak2
5 files changed, 5 insertions, 5 deletions
diff --git a/rc/base/lint.kak b/rc/base/lint.kak
index b38e3a8d..e02caa16 100644
--- a/rc/base/lint.kak
+++ b/rc/base/lint.kak
@@ -12,7 +12,7 @@ define-command lint -docstring 'Parse the current buffer with a linter' %{
%sh{
dir=$(mktemp -d "${TMPDIR:-/tmp}"/kak-lint.XXXXXXXX)
mkfifo "$dir"/fifo
- printf '%s\n' "evaluate-commands -no-hooks write $dir/buf"
+ printf '%s\n' "evaluate-commands -no-hooks write -sync $dir/buf"
printf '%s\n' "evaluate-commands -draft %{
edit! -fifo $dir/fifo -debug *lint-output*
diff --git a/rc/base/spell.kak b/rc/base/spell.kak
index 793b66f9..cd5a8277 100644
--- a/rc/base/spell.kak
+++ b/rc/base/spell.kak
@@ -12,7 +12,7 @@ Formats of language supported:
try %{ add-highlighter window ranges 'spell_regions' }
%sh{
file=$(mktemp -d "${TMPDIR:-/tmp}"/kak-spell.XXXXXXXX)/buffer
- printf 'eval -no-hooks write %s\n' "${file}"
+ printf 'eval -no-hooks write -sync %s\n' "${file}"
printf 'set-option buffer spell_tmp_file %s\n' "${file}"
}
%sh{
diff --git a/rc/core/formatter.kak b/rc/core/formatter.kak
index d84318dd..1e4a7f86 100644
--- a/rc/core/formatter.kak
+++ b/rc/core/formatter.kak
@@ -6,7 +6,7 @@ define-command format -docstring "Format the contents of the current buffer" %{
if [ -n "${kak_opt_formatcmd}" ]; then
path_file_tmp=$(mktemp "${TMPDIR:-/tmp}"/kak-formatter-XXXXXX)
printf %s\\n "
- write \"${path_file_tmp}\"
+ write -sync \"${path_file_tmp}\"
%sh{
readonly path_file_out=\$(mktemp \"${TMPDIR:-/tmp}\"/kak-formatter-XXXXXX)
diff --git a/rc/extra/clang.kak b/rc/extra/clang.kak
index 6e825266..61a3708a 100644
--- a/rc/extra/clang.kak
+++ b/rc/extra/clang.kak
@@ -14,7 +14,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are
dir=$(mktemp -d "${TMPDIR:-/tmp}"/kak-clang.XXXXXXXX)
mkfifo ${dir}/fifo
printf %s\\n "set-option buffer clang_tmp_dir ${dir}"
- printf %s\\n "evaluate-commands -no-hooks write ${dir}/buf"
+ printf %s\\n "evaluate-commands -no-hooks write -sync ${dir}/buf"
}
# end the previous %sh{} so that its output gets interpreted by kakoune
# before launching the following as a background task.
diff --git a/rc/extra/jedi.kak b/rc/extra/jedi.kak
index 95eaa912..c48cb71c 100644
--- a/rc/extra/jedi.kak
+++ b/rc/extra/jedi.kak
@@ -8,7 +8,7 @@ define-command jedi-complete -docstring "Complete the current selection" %{
dir=$(mktemp -d "${TMPDIR:-/tmp}"/kak-jedi.XXXXXXXX)
mkfifo ${dir}/fifo
printf %s\\n "set-option buffer jedi_tmp_dir ${dir}"
- printf %s\\n "evaluate-commands -no-hooks write ${dir}/buf"
+ printf %s\\n "evaluate-commands -no-hooks write -sync ${dir}/buf"
}
%sh{
dir=${kak_opt_jedi_tmp_dir}