pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.28k stars 125 forks source link

"attempt to perform arithmetic on field 'right_offset'" when opening PR #382

Closed proivk closed 1 year ago

proivk commented 1 year ago

Issue Description

Error appears when opening some PRs

Describe what you expected to happen

No error appears when opening PR

How to reproduce it (as minimally and precisely as possible)

*currently it reproduces on my private repository so I can't share exact PR with you where this issue appears.

  1. Octo pr list
  2. Select PR from the list and hit Enter

Type: bug report

Describe what happened (or what feature you want)

Error appears

error executing vim.schedule lua callback: ...m/site/pack/packer/opt/octo.nvim/lua/octo/ui/writers.lua:688: attempt to perform arithmetic on field 'right_offset' (a nil value)
stack traceback:
        ...m/site/pack/packer/opt/octo.nvim/lua/octo/ui/writers.lua:688: in function 'write_thread_snippet'
        ...m/site/pack/packer/opt/octo.nvim/lua/octo/ui/writers.lua:1318: in function 'write_threads'
        ...pack/packer/opt/octo.nvim/lua/octo/model/octo-buffer.lua:179: in function 'render_issue'
        ...re/nvim/site/pack/packer/opt/octo.nvim/lua/octo/init.lua:253: in function 'create_buffer'
        ...re/nvim/site/pack/packer/opt/octo.nvim/lua/octo/init.lua:82: in function 'cb'
        ...re/nvim/site/pack/packer/opt/octo.nvim/lua/octo/init.lua:107: in function 'cb'
        ...nvim/site/pack/packer/opt/octo.nvim/lua/octo/gh/init.lua:106: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

After that PR opens as usual

Tell us your environment

NVIM v0.8.3 Octo -> latest MacOs -> latest iTerm2

Anything else we need to know?