mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-08 21:54:46 +08:00
Make sure there is syntax to check subtype
This commit is contained in:
@@ -43,7 +43,11 @@ endfunction
|
|||||||
function! GetVueSubtype()
|
function! GetVueSubtype()
|
||||||
let lnum = line('.')
|
let lnum = line('.')
|
||||||
let cursyns = s:SynsEOL(lnum)
|
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')
|
let subtype = matchstr(syn, '\w\+\zeVue')
|
||||||
if subtype =~ 'css\w\+'
|
if subtype =~ 'css\w\+'
|
||||||
let subtype = subtype[3:]
|
let subtype = subtype[3:]
|
||||||
|
|||||||
Reference in New Issue
Block a user