Debugging the output

This commit is contained in:
Yannick Reiß 2024-02-19 16:06:05 +01:00
parent 2e6580d6b4
commit fa39db0e19
No known key found for this signature in database
GPG Key ID: 5A3AF456F0A0338C
1 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,11 @@ function M.lookup()
b = y b = y
end end
local current_line = 2 api.nvim_buf_set_lines(buf, 2, -1, false, {
"Found entries: " .. #dates,
})
local current_line = 3
for x = 1, #dates do for x = 1, #dates do
api.nvim_buf_set_lines(buf, current_line, -1, false, titles[x]) api.nvim_buf_set_lines(buf, current_line, -1, false, titles[x])
current_line = current_line + 1 current_line = current_line + 1
@ -177,6 +181,7 @@ function M.lookup()
api.nvim_buf_set_lines(buf, current_line, -1, false, "---") api.nvim_buf_set_lines(buf, current_line, -1, false, "---")
current_line = current_line + 1 current_line = current_line + 1
end end
api.nvim_buf_set_lines(buf, current_line, -1, false, "End of feed entries.")
-- disable write / make buffer readonly -- disable write / make buffer readonly
api.nvim_buf_set_option(buf, "modifiable", false) api.nvim_buf_set_option(buf, "modifiable", false)