diff --git a/rc/base/ctags.kak b/rc/base/ctags.kak index 96c93f809..d076cef0a 100644 --- a/rc/base/ctags.kak +++ b/rc/base/ctags.kak @@ -25,7 +25,7 @@ def -params 0..1 \ re=$0; sub(".*\t/\\^", "", re); sub("\\$?/$", "", re); gsub("(\\{|\\}|\\\\E).*$", "", re); keys=re; gsub(/", keys); gsub(/\t/, "", keys); - out = out " %{" $2 " {MenuInfo}" re "} %{eval -collapse-jumps %{ try %{ edit %{" $2 "}; exec %{/\\Q" keys "vc} } catch %{ echo %{unable to find tag} } } }" + out = out " %{" $2 " {MenuInfo}" re "} %{eval -collapse-jumps %{ try %{ edit %{" ENVIRON["tagroot"] $2 "}; exec %{/\\Q" keys "vc} } catch %{ echo %{unable to find tag} } } }" } /[^\t]+\t[^\t]+\t[0-9]+/ { out = out " %{" $2 ":" $3 "} %{eval -collapse-jumps %{ edit %{" ENVIRON["tagroot"] $2 "} %{" $3 "}}}" } END { print length(out) == 0 ? "echo -color Error no such tag " ENVIRON["tagname"] : "menu -markup -auto-single " out }'