diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-01-30 13:41:14 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-01-30 13:41:14 +0000 |
| commit | 47c8a4378fef5b7e078ca40918f26251d1567d5e (patch) | |
| tree | 28063dc05e92b442aa064a25af96856389fa4619 | |
| parent | 804a050c39fbb32db733a9affeee8356152b429d (diff) | |
fix :tag when a '<' is present in the search pattern
| -rw-r--r-- | rc/ctags.kak | 3 |
1 files changed, 2 insertions, 1 deletions
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 "<ret>vc} } catch %{ echo %{unable to find tag} } }" + keys=re; gsub(/</, "<lt>", keys); + out = out " %{" $2 " [" re "]} %{try %{ edit %{" $2 "}; exec %{/\\Q" keys "<ret>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 }' |
