From 70b1ad49dbe1985c41f5e80e2cafb4452ef9f0dc Mon Sep 17 00:00:00 2001 From: gingkapls <73906888+gingkapls@users.noreply.github.com> Date: Fri, 11 Jun 2021 12:05:44 +0530 Subject: [PATCH] Added checks for non-transparent themes Now both transparent and non-transparent themes work properly --- autoload/limelight.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/limelight.vim b/autoload/limelight.vim index 185c2d8..7388c49 100644 --- a/autoload/limelight.vim +++ b/autoload/limelight.vim @@ -137,7 +137,11 @@ endfunction function! s:dim(coeff) let synid = synIDtrans(hlID('Normal')) let fg = synIDattr(synid, 'fg#') - let bg = 0 + if synIDattr(synid, 'bg#') == 'none' + let bg = 0 + else + let bg = synIDattr(synid, 'bg#') + endif if has('gui_running') || has('termguicolors') && &termguicolors || has('nvim') && $NVIM_TUI_ENABLE_TRUE_COLOR if a:coeff < 0 && exists('g:limelight_conceal_guifg')