From 90ec9434b79d12bf82d89c358d4be228e762c369 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 15 Dec 2019 10:32:14 +1100 Subject: [PATCH] Fix clang completion output parsing --- rc/tools/clang.kak | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rc/tools/clang.kak b/rc/tools/clang.kak index 30a8f2a1..9022cf26 100644 --- a/rc/tools/clang.kak +++ b/rc/tools/clang.kak @@ -55,13 +55,14 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are awk -F ': ' ' /^COMPLETION:/ && $2 !~ /[(,](Hidden|Inaccessible)[),]/ { candidate=$3 - gsub(/[[<{]#.+?#[]>}]/, "", candidate) + gsub(/[[<{]#[^#]*#[]>}]/, "", candidate) gsub(/~/, "~~", candidate) gsub(/\|/, "\\|", candidate) - gsub(/[[{<]#|#[]}>]/, "", $3) + gsub(/[[{<]#|#[]}>]/, " ", $3) gsub(/:: /, "::", $3) - gsub(/ +$/, "", $3) + gsub(/ ,/, ",", $3) + gsub(/^ +| +$/, "", $3) docstring=$4 ? $3 "\n" $4 : $3 gsub(/~|!/, "&&", docstring)