mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:10:04 +08:00
fix(tagbar): fix tagbar startup
close https://github.com/SpaceVim/SpaceVim/issues/4872
This commit is contained in:
parent
2ae3d23dfc
commit
c6195cd0e4
@ -71,46 +71,46 @@ let [s:ilsep , s:irsep] = ['', '']
|
|||||||
let s:loaded_modes = []
|
let s:loaded_modes = []
|
||||||
let s:modes = {
|
let s:modes = {
|
||||||
\ 'center-cursor': {
|
\ 'center-cursor': {
|
||||||
\ 'icon' : '⊝',
|
\ 'icon' : '⊝',
|
||||||
\ 'icon_asc' : '-',
|
\ 'icon_asc' : '-',
|
||||||
\ 'desc' : 'centered-cursor mode',
|
\ 'desc' : 'centered-cursor mode',
|
||||||
\ },
|
\ },
|
||||||
\ 'hi-characters-for-long-lines' :{
|
\ 'hi-characters-for-long-lines' :{
|
||||||
\ 'icon' : '⑧',
|
\ 'icon' : '⑧',
|
||||||
\ 'icon_asc' : '8',
|
\ 'icon_asc' : '8',
|
||||||
\ 'desc' : 'toggle highlight of characters for long lines',
|
\ 'desc' : 'toggle highlight of characters for long lines',
|
||||||
\ },
|
\ },
|
||||||
\ 'fill-column-indicator' :{
|
\ 'fill-column-indicator' :{
|
||||||
\ 'icon' : s:MESSLETTERS.circled_letter('f'),
|
\ 'icon' : s:MESSLETTERS.circled_letter('f'),
|
||||||
\ 'icon_asc' : 'f',
|
\ 'icon_asc' : 'f',
|
||||||
\ 'desc' : 'fill-column-indicator mode',
|
\ 'desc' : 'fill-column-indicator mode',
|
||||||
\ },
|
\ },
|
||||||
\ 'syntax-checking' :{
|
\ 'syntax-checking' :{
|
||||||
\ 'icon' : s:MESSLETTERS.circled_letter('s'),
|
\ 'icon' : s:MESSLETTERS.circled_letter('s'),
|
||||||
\ 'icon_asc' : 's',
|
\ 'icon_asc' : 's',
|
||||||
\ 'desc' : 'syntax-checking mode',
|
\ 'desc' : 'syntax-checking mode',
|
||||||
\ },
|
\ },
|
||||||
\ 'spell-checking' :{
|
\ 'spell-checking' :{
|
||||||
\ 'icon' : s:MESSLETTERS.circled_letter('S'),
|
\ 'icon' : s:MESSLETTERS.circled_letter('S'),
|
||||||
\ 'icon_asc' : 'S',
|
\ 'icon_asc' : 'S',
|
||||||
\ 'desc' : 'spell-checking mode',
|
\ 'desc' : 'spell-checking mode',
|
||||||
\ },
|
\ },
|
||||||
\ 'paste-mode' :{
|
\ 'paste-mode' :{
|
||||||
\ 'icon' : s:MESSLETTERS.circled_letter('p'),
|
\ 'icon' : s:MESSLETTERS.circled_letter('p'),
|
||||||
\ 'icon_asc' : 'p',
|
\ 'icon_asc' : 'p',
|
||||||
\ 'desc' : 'paste mode',
|
\ 'desc' : 'paste mode',
|
||||||
\ },
|
\ },
|
||||||
\ 'whitespace' :{
|
\ 'whitespace' :{
|
||||||
\ 'icon' : s:MESSLETTERS.circled_letter('w'),
|
\ 'icon' : s:MESSLETTERS.circled_letter('w'),
|
||||||
\ 'icon_asc' : 'w',
|
\ 'icon_asc' : 'w',
|
||||||
\ 'desc' : 'whitespace mode',
|
\ 'desc' : 'whitespace mode',
|
||||||
\ },
|
\ },
|
||||||
\ 'wrapline' :{
|
\ 'wrapline' :{
|
||||||
\ 'icon' : s:MESSLETTERS.circled_letter('W'),
|
\ 'icon' : s:MESSLETTERS.circled_letter('W'),
|
||||||
\ 'icon_asc' : 'W',
|
\ 'icon_asc' : 'W',
|
||||||
\ 'desc' : 'wrap line mode',
|
\ 'desc' : 'wrap line mode',
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" the major_mode will be cached by default.
|
" the major_mode will be cached by default.
|
||||||
|
|
||||||
@ -374,7 +374,9 @@ endfunction
|
|||||||
function! SpaceVim#layers#core#statusline#_current_tag() abort
|
function! SpaceVim#layers#core#statusline#_current_tag() abort
|
||||||
let tag = ''
|
let tag = ''
|
||||||
try
|
try
|
||||||
let tag =tagbar#currenttag('%s ', '')
|
if execute('filetype') ==# 'detection:ON'
|
||||||
|
let tag = tagbar#currenttag('%s ', '')
|
||||||
|
endif
|
||||||
catch
|
catch
|
||||||
endtry
|
endtry
|
||||||
return tag
|
return tag
|
||||||
|
Loading…
Reference in New Issue
Block a user