From 2d428a704c6d4a00b0ad931f608d6b0274e02980 Mon Sep 17 00:00:00 2001 From: d7xdev Date: Fri, 16 Oct 2020 13:38:02 -0400 Subject: [PATCH] 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')