Make sure there is syntax to check subtype

This commit is contained in:
leafOfTree
2020-11-02 13:06:54 +08:00
parent b63f0a9bdf
commit ad9f8a7f5f

View File

@@ -43,7 +43,11 @@ endfunction
function! GetVueSubtype()
let lnum = line('.')
let cursyns = s:SynsEOL(lnum)
let syn = get(cursyns, 0, '')
if !empty(cursyns)
let syn = get(cursyns, 0, '')
else
let syn = ''
endif
let subtype = matchstr(syn, '\w\+\zeVue')
if subtype =~ 'css\w\+'
let subtype = subtype[3:]