From ae339dc3c4351f73cb34102b63c4798fe229f4e4 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Tue, 1 Nov 2016 20:31:24 +0000 Subject: [PATCH] Use %~~ for delimiting to avoid issues with braces in the message --- rc/base/lint.kak | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rc/base/lint.kak b/rc/base/lint.kak index 86f4543d..696532bc 100644 --- a/rc/base/lint.kak +++ b/rc/base/lint.kak @@ -48,7 +48,9 @@ def lint -docstring 'Parse the current buffer with a linter' %{ } END { print "set \"buffer=" file "\" lint_flags %{" stamp ":" substr(flags, 1, length(flags)-1) "}" - print "set \"buffer=" file "\" lint_errors %{" substr(errors, 1, length(errors)-1) "}" + errors = substr(errors, 1, length(errors)-1) + gsub("~", "\\~", errors) + print "set \"buffer=" file "\" lint_errors %~" errors "~" } ' "$dir"/stderr | kak -p "$kak_session"