From 35d3679703901da81081dc52233f3963c093dfe9 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 12 Mar 2016 16:44:08 +0000 Subject: [PATCH] Tweak clang.kak implementation of clang-show-completion-info --- rc/extra/clang.kak | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rc/extra/clang.kak b/rc/extra/clang.kak index f25f0d74..ce9e09d1 100644 --- a/rc/extra/clang.kak +++ b/rc/extra/clang.kak @@ -97,7 +97,8 @@ def -hidden clang-show-completion-info %[ try %[ eval -draft %[ exec '{(^\(b' %sh[ - desc=$(echo "${kak_opt_clang_completions}" | sed -e 's/\([^\\]\):/\1\n/g; s/\\:/:/g' | grep "^${kak_selection}@" | head -n1 | sed -e 's/.*[^\\]@\(.*[^\\]\)@.*$/\1/' ) + # desc=$(echo "${kak_opt_clang_completions}" | sed -e 's/\([^\\]\):/\1\n/g;' | sed -ne "/^${kak_selection}@/ { s/^[^@]\+@//; s/@.*$//; s/\\:/:/g; p }") + desc=$(echo "${kak_opt_clang_completions}" | sed -ne "{ s/\([^\\]\):/\1\n/g }; /^${kak_selection}@/ { s/^[^@]\+@//; s/@.*$//; s/\\\:/:/g; P }; D") if [ -n "$desc" ]; then echo "eval -client $kak_client %{info -anchor ${kak_cursor_line}.${kak_cursor_column} -placement above %{${desc}}}" fi