From 66dc16eb8deca9ecc00cfa7a09a01fbf991ff317 Mon Sep 17 00:00:00 2001 From: wzy <32936898+Freed-Wu@users.noreply.github.com> Date: Wed, 4 Mar 2020 18:02:42 +0800 Subject: [PATCH] Only update guifont if font and size not empty (#21) Close #20 --- autoload/thematic/gui.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/thematic/gui.vim b/autoload/thematic/gui.vim index 1b1485a..a27335e 100644 --- a/autoload/thematic/gui.vim +++ b/autoload/thematic/gui.vim @@ -164,7 +164,12 @@ function! thematic#gui#setFont(th) abort let l:fs = thematic#getThemeValue(a:th, 'font-size', -1) " TODO support list of typefaces with most desired as first in list - let l:gf = s:composeGuifontString(l:tf, l:fs) + if l:tf == '' || l:fs == '-1' + let l:gf = '' + else + let l:gf = s:composeGuifontString(l:tf, l:fs) + endif + if l:gf != '' call s:setGuifont(l:gf) endif