From 39a859d85da8d228c3ebcc1b8bc02b8805083577 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 5 Oct 2015 13:51:42 +0100 Subject: [PATCH] Use markup in :tag menu to show search pattern --- rc/ctags.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/ctags.kak b/rc/ctags.kak index 043f13ec..06b56119 100644 --- a/rc/ctags.kak +++ b/rc/ctags.kak @@ -19,10 +19,10 @@ def -shell-params \ /[^\t]+\t[^\t]+\t\/\^.*\$\// { re=$0; sub(".*\t/\\^", "", re); sub("\\$/.*", "", re); gsub("(\\{|\\}).*$", "", re); keys=re; gsub(/", keys); - out = out " %{" $2 " [" re "]} %{try %{ edit %{" $2 "}; exec %{/\\Q" keys "vc} } catch %{ echo %{unable to find tag} } }" + out = out " %{" $2 " {MenuInfo}" re "} %{try %{ edit %{" $2 "}; exec %{/\\Q" keys "vc} } catch %{ echo %{unable to find tag} } }" } /[^\t]+\t[^\t]+\t([0-9]+)/ { out = out " %{" $2 ":" $3 "} %{edit %{" $2 "} %{" $3 "}}" } - END { print length(out) == 0 ? "echo -color Error no such tag " ENVIRON["tagname"] : "menu -auto-single " out }' + END { print length(out) == 0 ? "echo -color Error no such tag " ENVIRON["tagname"] : "menu -markup -auto-single " out }' }} def tag-complete -docstring "Insert completion candidates for the current selection into the buffer's local variables" %{ eval -draft %{