You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error executing vim.schedule lua callback: ...pack/packer/start/vim-be-good/lua/vim-be-good/buffer.lua:103: Unexpected type
stack traceback:
[C]: in function 'nvim_buf_set_lines'
...pack/packer/start/vim-be-good/lua/vim-be-good/buffer.lua:103: in function 'render'
...packer/start/vim-be-good/lua/vim-be-good/game-runner.lua:305: in function 'run'
...packer/start/vim-be-good/lua/vim-be-good/game-runner.lua:245: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Neovim Version: v0.9.5
The text was updated successfully, but these errors were encountered:
I don't want to fix this because I don't know exactly how it was supposed to work, but this error is because the lines table being passed to nvim_buf_set_lines sometimes has something at the zeroth index. This has something to do with CiRound:Render interacting getRandomInsertionLocation but it's not clear to me how this was actually supposed to work (for instance I can't tell if gameLineCount is supposed to include the instructions or not, at 20 it's too low to include them but linesAfterInstructions = gameLineCount - #instructions seems to imply that they are included).
I replace the vim.api.nvim_buf_set_lines(self.bufh, idx, idx + #lines, false, lines) line with this small snippet that shifts by 1 if the table starts from 0.
The error come out sometimes in the ci{ game:
Neovim Version: v0.9.5
The text was updated successfully, but these errors were encountered: