mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
fix again nil issues
This commit is contained in:
parent
7106e067cb
commit
322d07be58
@ -132,8 +132,8 @@ M.setup = function(config)
|
||||
-- an object for cwd
|
||||
ensure_correct_config(complete_config)
|
||||
|
||||
terminals.setup(complete_config)
|
||||
mark.setup(complete_config)
|
||||
terminals.setup(complete_config.projects[cwd].term)
|
||||
mark.setup(complete_config.projects[cwd].mark)
|
||||
harpoon_config = complete_config
|
||||
end
|
||||
|
||||
|
@ -14,10 +14,16 @@ function get_id_or_current_buffer(id)
|
||||
end
|
||||
|
||||
M.setup = function(config)
|
||||
if not config.projects[cwd] then
|
||||
mark_config = {marks = {}}
|
||||
else
|
||||
mark_config = config.projects[cwd].mark
|
||||
mark_config = config
|
||||
if mark_config.marks == nil then
|
||||
|
||||
-- resetting the mark config if there is an issue loading the config
|
||||
-- this can hide errors.
|
||||
--
|
||||
-- TODO: create a logging mechanism to get these values
|
||||
mark_config = {
|
||||
marks = {}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -64,11 +64,17 @@ end
|
||||
}
|
||||
}
|
||||
--]]
|
||||
|
||||
M.setup = function(config)
|
||||
if not config.projects[cwd] then
|
||||
terminal_config = {}
|
||||
else
|
||||
terminal_config = config.projects[cwd].term
|
||||
terminal_config = config
|
||||
if terminal_config.cmds == nil then
|
||||
|
||||
-- Resets terminal config if there is some missing values.
|
||||
--
|
||||
-- TODO: create a logging mechanism to get these values
|
||||
terminal_config = {
|
||||
cmds = {}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user