From 31bcf63af8a9bfb7b423d2e7dc8240c234a777da Mon Sep 17 00:00:00 2001 From: Lucas Stadler Date: Sun, 12 Jan 2014 13:25:23 +0100 Subject: [PATCH] Only reload the colorscheme if one is defined. E.g. work with the default one which doesn't define `g:colors_name`. --- plugin/goyo.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/goyo.vim b/plugin/goyo.vim index a2beb4a..06403b7 100644 --- a/plugin/goyo.vim +++ b/plugin/goyo.vim @@ -259,7 +259,9 @@ function! s:goyo_off() for [k, v] in items(goyo_revert) execute printf("let &%s = %s", k, string(v)) endfor - execute 'colo '. g:colors_name + if exists('g:colors_name') + execute 'colo '. g:colors_name + endif if goyo_disabled_gitgutter silent! GitGutterEnable