From 070a75cb04c6f675226c3f777ec9bd78fc0a0a04 Mon Sep 17 00:00:00 2001 From: Zhao Cai Date: Wed, 15 May 2013 08:00:08 -0400 Subject: [PATCH] Export tagbar#currentfile() function --- autoload/tagbar.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 4de9a62..5d62343 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -3747,6 +3747,17 @@ function! tagbar#currenttag(fmt, default, ...) abort endif endfunction +" tagbar#currentfile() {{{2 +function! tagbar#currentfile() abort + let filename = '' + + if !empty(s:known_files.getCurrent()) + let filename = fnamemodify(s:known_files.getCurrent().fpath, ':t') + endif + + return filename +endfunction + " tagbar#gettypeconfig() {{{2 function! tagbar#gettypeconfig(type) abort if !s:Init(1)