From 41b5336296d9259d34c7e9a1b30b963fa1d7a5f2 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 12 Nov 2012 19:42:26 +0100 Subject: [PATCH] make ctags.kak tag implementation more robust --- src/rc/ctags.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rc/ctags.kak b/src/rc/ctags.kak index 48fdc749..61730fea 100644 --- a/src/rc/ctags.kak +++ b/src/rc/ctags.kak @@ -13,8 +13,8 @@ def -shell-params \ echo "echo tag not found ${tagname}" else menuparam=$(readtags ${tagname} | perl -i -ne ' - /([^\t]+)\t([^\t]+)\t\/\^(.*)\$\// and print "%{$2 [$3]} %{try %{ edit %{$2}; exec %{%s\\Q$3} } catch %{ echo %{unable to find tag} } } "; - /([^\t]+)\t([^\t]+)\t(\d+)/ and print "%{$2:$3} %{edit %{$2}; exec %{$3g}} "; + /([^\t]+)\t([^\t]+)\t\/\^(.*)\$\// and print "%{$2 [$3]} %{try %{ edit %{$2}; exec %{/\\Q$3} } catch %{ echo %{unable to find tag} } } "; + /([^\t]+)\t([^\t]+)\t(\d+)/ and print "%{$2:$3} %{edit %{$2} %{$3}}"; ') if [[ -z "${menuparam}" ]]; then