We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc414a4 commit 5039c23Copy full SHA for 5039c23
lua/persisted/init.lua
@@ -193,18 +193,8 @@ function M.allowed_dir(opts)
193
opts = opts or {}
194
local dir = opts.dir or vim.fn.getcwd()
195
196
- return
197
- (
198
- next(config.allowed_dirs)
199
- and utils.dirs_match(dir, config.allowed_dirs)
200
- or true
201
- )
202
- and not
203
204
- next(config.ignored_dirs)
205
- and utils.dirs_match(dir, config.ignored_dirs)
206
- or false
207
+ return (next(config.allowed_dirs) and utils.dirs_match(dir, config.allowed_dirs) or true)
+ and not (next(config.ignored_dirs) and utils.dirs_match(dir, config.ignored_dirs) or false)
208
end
209
210
---Get an ordered list of sessions, sorted by modified time
0 commit comments