protect plugin against windows and prevent macos from crashing due to --ignore

This commit is contained in:
kyazdani42
2020-02-22 17:36:05 +01:00
parent 4422ebc299
commit e5db994ebb
2 changed files with 5 additions and 2 deletions

View File

@@ -19,7 +19,10 @@ local Tree = {}
local IGNORE_LIST = ""
if api.nvim_call_function('exists', { 'g:lua_tree_ignore' }) == 1 then
local UNIX = api.nvim_call_function('has', { 'unix' }) == 1
-- --ignore does not work with mac ls
if UNIX and api.nvim_call_function('exists', { 'g:lua_tree_ignore' }) == 1 then
local ignore_patterns = api.nvim_get_var('lua_tree_ignore')
if type(ignore_patterns) == 'table' then
for _, pattern in pairs(ignore_patterns) do