From 312a80ff51ff941280c88af646b65f7aed08aad5 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Thu, 16 Feb 2017 12:35:17 -0500 Subject: [PATCH] Allow user to override list of tasks before loading the plugin. This solves a bug where the user adds `let g:searchtasks_list=...` in their `.vimrc` file and it gets set before the plugin is loaded, thus calling `finish` on first load. --- plugin/searchtasks.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/searchtasks.vim b/plugin/searchtasks.vim index a07bda0..a6337db 100644 --- a/plugin/searchtasks.vim +++ b/plugin/searchtasks.vim @@ -2,12 +2,12 @@ " Maintainer: Gilson Filho " Version: 1.0 -if exists("g:searchtasks_list") || &cp || v:version < 700 +if exists("g:searchtasks_loaded") || &cp || v:version < 700 finish endif let g:searchtasks_list=["TODO", "FIXME", "XXX"] - +let g:searchtasks_loaded=1 " Search tasks {{{ function s:SearchTasks(directory)