pwntester / octo.nvim

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

Bug: comment edit buffer name already exists #135

Closed sharksforarms closed 3 years ago

sharksforarms commented 3 years ago

Issue Description

Type: bug report

Describe what happened (or what feature you want)

When I try to edit a comment using <space>ce I get the following error message:

E5108: Error executing lua ...arks/.config/nvim/plugged/octo.nvim/lua/octo/reviews.lua:314: Vim:E95: Buffer with this name already exists

Proceeded with an empty buffer which pops up

Describe what you expected to happen

Edit existing comment

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

  1. Add comment using <space>ca
  2. Edit comment using <space>ce

Note: If I restart my nvim, and resume the review, I can now edit comments. If I try editing more than once, the same error happens.

Tell us your environment

Latest octo.nvim

nvim --version
NVIM v0.5.0-dev+1191-gf89bfa686
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Anything else we need to know?

While editing a comment (after :wq) , I get: Error executing vim.schedule lua callback: ...arks/.config/nvim/plugged/octo.nvim/lua/octo/reviews.lua:394: attempt to index local 'comment' (a nil value) maybe this is a separate issue

pwntester commented 3 years ago

Thanks for reporting the issue. I'm kind of refactoring the whole review process to make it more consistent with how issue/PRs buffer work. I Will hopefully have this ready by the end of the week so will try to address this issue as part of this refactoring although these errors will probably go away when I remove the use of float windows, etc.

pwntester commented 3 years ago

This should be fixed now that the refactoring of the review process has been merged. Please read the README for instructions on how the process works now. Any suggestions are welcome!

sharksforarms commented 3 years ago

Looks great! Thanks for the awesome project!