allow flags to be scoped to a plugin

Add new FlagSet class and init each Path with one.

Call Path.flagSet.addFlag(scope, flag) instead of Path.addFlag(flag)
This commit is contained in:
Martin Grenfell
2014-07-05 20:51:21 +01:00
parent a7428eba38
commit 32cf3ee62d
4 changed files with 61 additions and 28 deletions

View File

@@ -23,9 +23,9 @@ function! g:NERDTreeGitRefreshListener(path)
let modifiedFiles = s:GetModifiedFiles()
if index(modifiedFiles, a:path.str()) >= 0
call a:path.addFlag("+")
call a:path.flagSet.addFlag("git", "+")
else
call a:path.removeFlag("+")
call a:path.flagSet.removeFlag("git", "+")
endif
endfunction