mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-15 15:03:51 -05:00
fix tagbar buffer detection (ref: #405)
This commit is contained in:
@@ -330,7 +330,7 @@ let g:lightline = {
|
|||||||
\ }
|
\ }
|
||||||
|
|
||||||
function! LightlineMode()
|
function! LightlineMode()
|
||||||
return expand('%:t') ==# '__Tagbar__' ? 'Tagbar':
|
return expand('%:t') =~# '^__Tagbar__' ? 'Tagbar':
|
||||||
\ expand('%:t') ==# 'ControlP' ? 'CtrlP' :
|
\ expand('%:t') ==# 'ControlP' ? 'CtrlP' :
|
||||||
\ &filetype ==# 'unite' ? 'Unite' :
|
\ &filetype ==# 'unite' ? 'Unite' :
|
||||||
\ &filetype ==# 'vimfiler' ? 'VimFiler' :
|
\ &filetype ==# 'vimfiler' ? 'VimFiler' :
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Version: 0.1
|
|||||||
Author: itchyny (https://github.com/itchyny)
|
Author: itchyny (https://github.com/itchyny)
|
||||||
License: MIT License
|
License: MIT License
|
||||||
Repository: https://github.com/itchyny/lightline.vim
|
Repository: https://github.com/itchyny/lightline.vim
|
||||||
Last Change: 2019/08/14 10:46:55.
|
Last Change: 2019/12/27 18:11:21.
|
||||||
|
|
||||||
CONTENTS *lightline-contents*
|
CONTENTS *lightline-contents*
|
||||||
|
|
||||||
@@ -825,8 +825,7 @@ For users who uses lots of plugins:
|
|||||||
function! LightlineFilename()
|
function! LightlineFilename()
|
||||||
let fname = expand('%:t')
|
let fname = expand('%:t')
|
||||||
return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item :
|
return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item :
|
||||||
\ fname == '__Tagbar__' ? g:lightline.fname :
|
\ fname =~# '^__Tagbar__\|__Gundo\|NERD_tree' ? '' :
|
||||||
\ fname =~ '__Gundo\|NERD_tree' ? '' :
|
|
||||||
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
|
\ &ft == 'vimfiler' ? vimfiler#get_status_string() :
|
||||||
\ &ft == 'unite' ? unite#get_status_string() :
|
\ &ft == 'unite' ? unite#get_status_string() :
|
||||||
\ &ft == 'vimshell' ? vimshell#get_status_string() :
|
\ &ft == 'vimshell' ? vimshell#get_status_string() :
|
||||||
@@ -861,7 +860,7 @@ For users who uses lots of plugins:
|
|||||||
|
|
||||||
function! LightlineMode()
|
function! LightlineMode()
|
||||||
let fname = expand('%:t')
|
let fname = expand('%:t')
|
||||||
return fname == '__Tagbar__' ? 'Tagbar' :
|
return fname =~# '^__Tagbar__' ? 'Tagbar' :
|
||||||
\ fname == 'ControlP' ? 'CtrlP' :
|
\ fname == 'ControlP' ? 'CtrlP' :
|
||||||
\ fname == '__Gundo__' ? 'Gundo' :
|
\ fname == '__Gundo__' ? 'Gundo' :
|
||||||
\ fname == '__Gundo_Preview__' ? 'Gundo Preview' :
|
\ fname == '__Gundo_Preview__' ? 'Gundo Preview' :
|
||||||
@@ -902,7 +901,6 @@ For users who uses lots of plugins:
|
|||||||
let g:tagbar_status_func = 'TagbarStatusFunc'
|
let g:tagbar_status_func = 'TagbarStatusFunc'
|
||||||
|
|
||||||
function! TagbarStatusFunc(current, sort, fname, ...) abort
|
function! TagbarStatusFunc(current, sort, fname, ...) abort
|
||||||
let g:lightline.fname = a:fname
|
|
||||||
return lightline#statusline(0)
|
return lightline#statusline(0)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user