Skip to content

Commit 691b8ab

Browse files
committed
Check 'termguicolors' instead of 'nvim'
What we're really trying to detect here is whether the highlighting is being done using GUI colors or terminal color codes. This change reflects that. Just because it's Neovim doesn't mean it's GUI colors.
1 parent a35e9ce commit 691b8ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/pandoc.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ if g:pandoc#syntax#style#emphases == 1
584584
if !exists('s:hi_tail')
585585
for s:i in ["fg", "bg"]
586586
let s:tmp_val = synIDattr(synIDtrans(hlID("String")), s:i)
587-
let s:tmp_ui = has('gui_running') || has('nvim') ? 'gui' : 'cterm'
587+
let s:tmp_ui = has('gui_running') || (has('termguicolors') && &termguicolors) ? 'gui' : 'cterm'
588588
if !empty(s:tmp_val) && s:tmp_val != -1
589589
exe 'let s:'.s:i . ' = "'.s:tmp_ui.s:i.'='.s:tmp_val.'"'
590590
else

0 commit comments

Comments
 (0)