ctags.kak: fix support for tags with a tab character in search line
This commit is contained in:
parent
0df088be20
commit
409be4731f
|
@ -11,8 +11,8 @@ def -shell-params \
|
||||||
export tagname=${1:-${kak_selection}}
|
export tagname=${1:-${kak_selection}}
|
||||||
readtags ${tagname} | awk -F '\t|\n' -e '
|
readtags ${tagname} | awk -F '\t|\n' -e '
|
||||||
/[^\t]+\t[^\t]+\t\/\^.*\$\// {
|
/[^\t]+\t[^\t]+\t\/\^.*\$\// {
|
||||||
gsub("^/\\^", "", $3); gsub("\\$/$", "", $3); gsub("(\\{|\\}).*$", "", $3);
|
re=$0; sub(".*\t/\\^", "", re); sub("\\$/.*", "", re); gsub("(\\{|\\}).*$", "", re);
|
||||||
out = out " %{" $2 " [" $3 "]} %{try %{ edit %{" $2 "}; exec %{/\\Q" $3 "<ret>vc} } catch %{ echo %{unable to find tag} } }"
|
out = out " %{" $2 " [" re "]} %{try %{ edit %{" $2 "}; exec %{/\\Q" re "<ret>vc} } catch %{ echo %{unable to find tag} } }"
|
||||||
}
|
}
|
||||||
/[^\t]+\t[^\t]+\t([0-9]+)/ { out = out " %{" $2 ":" $3 "} %{edit %{" $2 "} %{" $3 "}}" }
|
/[^\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 -auto-single " out }'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user