From f5792732de16b8a2cc202f920e363eb413d7241d Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Thu, 15 Jun 2017 17:28:33 +1200 Subject: [PATCH] Escape tag name when removing it from a pseudo tag's scope path --- autoload/tagbar.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index cd65fd0..dc927d6 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -2733,7 +2733,7 @@ function! s:create_pseudotag(name, parent, kind, typeinfo, fileinfo) abort let pseudotag = s:PseudoTag.New(a:name) let pseudotag.fields.kind = a:kind - let parentscope = substitute(curpath, a:name . '$', '', '') + let parentscope = substitute(curpath, '\V' . a:name . '$', '', '') let parentscope = substitute(parentscope, \ '\V\^' . a:typeinfo.sro . '\$', '', '')