mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-16 11:00:23 +00:00
fix: active list caused nil access error
This commit is contained in:
parent
dfcb8488df
commit
ec03b3cc4b
@ -25,13 +25,21 @@ function HarpoonUI:new(settings)
|
|||||||
}, self)
|
}, self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function get_name(list)
|
||||||
|
if list ~= nil then
|
||||||
|
return list.name
|
||||||
|
end
|
||||||
|
|
||||||
|
return "(list nil)"
|
||||||
|
end
|
||||||
|
|
||||||
function HarpoonUI:close_menu()
|
function HarpoonUI:close_menu()
|
||||||
if self.closing then
|
if self.closing then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self.closing = true
|
self.closing = true
|
||||||
Logger:log("ui#close_menu name: ", self.active_list.name, "win and bufnr", {
|
Logger:log("ui#close_menu name: ", get_name(self.active_list), "win and bufnr", {
|
||||||
win = self.win_id,
|
win = self.win_id,
|
||||||
bufnr = self.bufnr
|
bufnr = self.bufnr
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user