Remove redundant SetStatusLine argument, ref #335

Thank you to @jpmv27 for spotting this.
This commit is contained in:
Jan Larres 2016-09-19 23:10:10 +12:00
parent 61ba5ba578
commit b7f147aabc

View File

@ -1031,8 +1031,8 @@ function! s:CreateAutocommands() abort
augroup TagbarAutoCmds
autocmd!
autocmd CursorHold __Tagbar__ call s:ShowPrototype(1)
autocmd WinEnter __Tagbar__ call s:SetStatusLine('current')
autocmd WinLeave __Tagbar__ call s:SetStatusLine('noncurrent')
autocmd WinEnter __Tagbar__ call s:SetStatusLine()
autocmd WinLeave __Tagbar__ call s:SetStatusLine()
if g:tagbar_autopreview
autocmd CursorMoved __Tagbar__ nested call s:ShowInPreviewWin()
@ -1890,7 +1890,7 @@ function! s:InitWindow(autoclose) abort
let w:autoclose = a:autoclose
call s:SetStatusLine('current')
call s:SetStatusLine()
let s:new_window = 1
@ -2655,7 +2655,7 @@ function! s:ToggleSort() abort
call fileinfo.sortTags()
call s:RenderContent()
call s:SetStatusLine('current')
call s:SetStatusLine()
" If we were on a tag before sorting then jump to it, otherwise restore
" the cursor to the current line
@ -3526,7 +3526,7 @@ function! s:AutoUpdate(fname, force) abort
endif
call s:HighlightTag(0)
call s:SetStatusLine('noncurrent')
call s:SetStatusLine()
call s:debug('AutoUpdate finished successfully')
endfunction
@ -3872,7 +3872,7 @@ function! s:ToggleHideNonPublicTags() abort
let g:tagbar_hide_nonpublic = !g:tagbar_hide_nonpublic
call s:RenderKeepView()
call s:SetStatusLine('current')
call s:SetStatusLine()
" If we were on a tag before sorting then jump to it, otherwise restore
" the cursor to the current line
@ -3901,7 +3901,7 @@ function! s:ToggleCaseInsensitive() abort
call fileinfo.sortTags()
call s:RenderKeepView()
call s:SetStatusLine('current')
call s:SetStatusLine()
" If we were on a tag before sorting then jump to it, otherwise restore
" the cursor to the current line
@ -3915,7 +3915,7 @@ endfunction
" s:ToggleAutoclose() {{{2
function! s:ToggleAutoclose() abort
let g:tagbar_autoclose = !g:tagbar_autoclose
call s:SetStatusLine('current')
call s:SetStatusLine()
endfunction
" s:IsValidFile() {{{2
@ -3957,7 +3957,7 @@ function! s:IsValidFile(fname, ftype) abort
endfunction
" s:SetStatusLine() {{{2
function! s:SetStatusLine(current)
function! s:SetStatusLine()
" Make sure we're actually in the Tagbar window
let tagbarwinnr = bufwinnr('__Tagbar__')
if tagbarwinnr == -1
@ -3969,7 +3969,6 @@ function! s:SetStatusLine(current)
else
let in_tagbar = 1
endif
let current = a:current == 'current'
let sort = g:tagbar_sort ? 'Name' : 'Order'
@ -3986,10 +3985,10 @@ function! s:SetStatusLine(current)
let flags += g:tagbar_hide_nonpublic ? ['v'] : []
if exists('g:tagbar_status_func')
let args = [current, sort, fname, flags]
let args = [in_tagbar, sort, fname, flags]
let &l:statusline = call(g:tagbar_status_func, args)
else
let colour = current ? '%#StatusLine#' : '%#StatusLineNC#'
let colour = in_tagbar ? '%#StatusLine#' : '%#StatusLineNC#'
let flagstr = join(flags, '')
if flagstr != ''
let flagstr = '[' . flagstr . '] '