Toggling folds doesn't work #185

Closed
audriusk opened this Issue Dec 8, 2013 · 1 comment

Comments

Projects
None yet
2 participants

audriusk commented Dec 8, 2013

When trying to toggle folds inside Tagbar window, Vim (version 7.4.113) complains about s:known_files.getCurrent function lacking an argument. I looked around and it's the only place where this function is called without any arguments. The following patch fixes this:

diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim
--- a/autoload/tagbar.vim
+++ b/autoload/tagbar.vim
@@ -1497,7 +1497,7 @@

 " s:KindheaderTag.toggleFold() {{{3
 function! s:KindheaderTag.toggleFold() abort dict
-    let fileinfo = s:known_files.getCurrent()
+    let fileinfo = s:known_files.getCurrent(0)

     let fileinfo.kindfolds[self.short] = !fileinfo.kindfolds[self.short]
 endfunction

I'm just not sure if the argument should be 0 or 1 here.

majutsushi closed this in dbc05b2 Dec 9, 2013

Owner

majutsushi commented Dec 9, 2013

Thanks! I wonder how I missed that when changing the function ...
And 0 is the correct value as 1 is only used for the statusline functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment