From 2d428a704c6d4a00b0ad931f608d6b0274e02980 Mon Sep 17 00:00:00 2001 From: d7xdev Date: Fri, 16 Oct 2020 13:38:02 -0400 Subject: [PATCH 1/2] Fix E121: Undefined variable `g:dracula_undercurl` The variable `g:dracula_undercurl` is not properly defined when underline attribute is disabled by user configuration: let g:dracula_underline = 0 The fix always defines missing `g:dracula_undercurl`, but also disables it when underline is disabled. --- colors/dracula.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/colors/dracula.vim b/colors/dracula.vim index 816385b..6c28671 100644 --- a/colors/dracula.vim +++ b/colors/dracula.vim @@ -81,8 +81,12 @@ if !exists('g:dracula_underline') let g:dracula_underline = 1 endif -if !exists('g:dracula_undercurl') && g:dracula_underline != 0 - let g:dracula_undercurl = 1 +if !exists('g:dracula_undercurl') + if g:dracula_underline == 0 + let g:dracula_undercurl = 0 + else + let g:dracula_undercurl = 1 + endif endif if !exists('g:dracula_inverse') From fad0ba755cec517be4af101ca93ea0b4a33c626b Mon Sep 17 00:00:00 2001 From: d7xdev Date: Mon, 19 Oct 2020 15:59:07 -0400 Subject: [PATCH 2/2] Make `g:dracula_undercurl` init shorter and safer Reference: https://github.com/dracula/vim/pull/213#discussion_r507804384 --- colors/dracula.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/colors/dracula.vim b/colors/dracula.vim index 6c28671..ac964f7 100644 --- a/colors/dracula.vim +++ b/colors/dracula.vim @@ -82,11 +82,7 @@ if !exists('g:dracula_underline') endif if !exists('g:dracula_undercurl') - if g:dracula_underline == 0 - let g:dracula_undercurl = 0 - else - let g:dracula_undercurl = 1 - endif + let g:dracula_undercurl = g:dracula_underline endif if !exists('g:dracula_inverse')