pwntester / octo.nvim

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

fix: load octo in the correct buffer #554

Closed folke closed 3 weeks ago

folke commented 3 weeks ago

Describe what this PR does / why we need it

When Octo loads on BufReadCmd octo://*, it doesn't pass the correct buffer and can as such eventually load in a different buffer

Does this pull request fix one issue?

Describe how you did it

Simply pass the event buffer and wrap the result callback in a nvim_buf_call to ensure we render in the correctbuffer

Describe how to verify it

Add blank to sessionoptions. Make a split with one normal file and with an octo buffer. Make the normal file the current window. Make a session Exit Neovim Open NEovim Restore Session The octo buffer will load in the correct window, Without this PR, it would load in the file window.

Special notes for reviews

pwntester commented 3 weeks ago

Thanks!