From 47c8a4378fef5b7e078ca40918f26251d1567d5e Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 30 Jan 2015 13:41:14 +0000 Subject: [PATCH] fix :tag when a '<' is present in the search pattern --- rc/ctags.kak | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rc/ctags.kak b/rc/ctags.kak index 8741659d..e0f5059b 100644 --- a/rc/ctags.kak +++ b/rc/ctags.kak @@ -18,7 +18,8 @@ def -shell-params \ ) | awk -F '\t|\n' -e ' /[^\t]+\t[^\t]+\t\/\^.*\$\// { re=$0; sub(".*\t/\\^", "", re); sub("\\$/.*", "", re); gsub("(\\{|\\}).*$", "", re); - out = out " %{" $2 " [" re "]} %{try %{ edit %{" $2 "}; exec %{/\\Q" re "vc} } catch %{ echo %{unable to find tag} } }" + keys=re; gsub(/", keys); + out = out " %{" $2 " [" 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 }'