fix: tests were breaking due to logging

This commit is contained in:
mpaulson 2023-12-04 12:15:00 -07:00
parent c53305c2d0
commit dfcb8488df
3 changed files with 11 additions and 3 deletions

View File

@ -170,7 +170,14 @@ function M.get_default_config()
if item then
local pos = vim.api.nvim_win_get_cursor(0)
Logger:log("config_default#BufLeave updating position", bufnr, bufname, item, "to position", pos)
Logger:log(
"config_default#BufLeave updating position",
bufnr,
bufname,
item,
"to position",
pos
)
item.context.row = pos[1]
item.context.col = pos[2]

View File

@ -19,7 +19,8 @@ function HarpoonLog:log(...)
local msg = {}
for i = 1, select("#", ...) do
table.insert(msg, vim.inspect(select(i, ...)))
local item = select(i, ...)
table.insert(msg, vim.inspect(item))
end
table.insert(self.lines, table.concat(msg, " "))

View File

@ -38,7 +38,7 @@ describe("list", function()
local config = Config.merge_config({
foo = {
select_with_nil = true,
select = function(list_item, options)
select = function(list_item, _, options)
foo_selected = { list_item, options }
end,
},