mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +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)
|
||||
end
|
||||
|
||||
local function get_name(list)
|
||||
if list ~= nil then
|
||||
return list.name
|
||||
end
|
||||
|
||||
return "(list nil)"
|
||||
end
|
||||
|
||||
function HarpoonUI:close_menu()
|
||||
if self.closing then
|
||||
return
|
||||
end
|
||||
|
||||
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,
|
||||
bufnr = self.bufnr
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user