chore(formatting): updates
parent
ce9d621683
commit
a192a0a11a
|
|
@ -104,7 +104,6 @@ local function get_last()
|
||||||
return sessions[1]
|
return sessions[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---Get the current Git branch name, untouched
|
---Get the current Git branch name, untouched
|
||||||
---@param dir? string Directory to be used for the session
|
---@param dir? string Directory to be used for the session
|
||||||
---@return string|nil
|
---@return string|nil
|
||||||
|
|
@ -219,11 +218,7 @@ function M.load(opt, dir)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if
|
if config.options.autosave and (allow_dir(dir) and not ignore_dir(dir)) and not ignore_branch(branch) then
|
||||||
config.options.autosave
|
|
||||||
and (allow_dir(dir) and not ignore_dir(dir))
|
|
||||||
and not ignore_branch(branch)
|
|
||||||
then
|
|
||||||
M.start()
|
M.start()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -286,7 +281,11 @@ function M.save(opt, dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Do not save the session if the callback returns false...unless it's forced
|
-- Do not save the session if the callback returns false...unless it's forced
|
||||||
if not opt.force and type(config.options.should_autosave) == "function" and not config.options.should_autosave() then
|
if
|
||||||
|
not opt.force
|
||||||
|
and type(config.options.should_autosave) == "function"
|
||||||
|
and not config.options.should_autosave()
|
||||||
|
then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,9 @@ end
|
||||||
---@return boolean
|
---@return boolean
|
||||||
function M.dirs_match(dir, dirs_table)
|
function M.dirs_match(dir, dirs_table)
|
||||||
dir = vim.fn.expand(dir)
|
dir = vim.fn.expand(dir)
|
||||||
return M.table_match(dir, dirs_table, function(pattern) return escape_pattern(vim.fn.expand(pattern)) end)
|
return M.table_match(dir, dirs_table, function(pattern)
|
||||||
|
return escape_pattern(vim.fn.expand(pattern))
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
---Check if a string matches and entry in a given table
|
---Check if a string matches and entry in a given table
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue