In get_hl(), discard returned synIDattr values of -1

This commit is contained in:
Jonny Bylsma
2019-06-03 17:12:50 -04:00
committed by Andy Stewart
parent a4e8d3f188
commit 8696c880df

View File

@@ -133,7 +133,7 @@ endfunction
function! s:get_hl(group, what, mode) abort
let r = synIDattr(synIDtrans(hlID(a:group)), a:what, a:mode)
if r ==# ''
if index(['', '-1'], r) >= 0
return 'NONE'
endif
return r