mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 20:03:48 -05:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user