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

Octo review submit box has strange behavior #180

Closed aareman closed 2 years ago

aareman commented 3 years ago

Issue Description

Type: bug report

Describe what happened

The Octo review submit dialog is very buggy for me. When writing the top level review comment if I press escape I get image Which is distracting. Also if I leave that buffer by accident I lose my comments.

Describe what you expected to happen

Could it be a normal buffer that allows me to use regular vim motions to edit. (filetype could be set to markdown too).

Would make the editing more intuitive, and not lose work. Similar to how github handles that box. Where you can add a comment, go back to the review, and then edit it until you do the final submission.

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

  1. Octo review start
  2. Octo review submit
  3. press <esc> or leave submit buffer

Tell us your environment

ubuntu 20 image

Anything else we need to know?

Great plugin, thank you very much

pwntester commented 3 years ago

Thanks for the report. I cant reproduce the issue though. What is the output of :map <esc> when you are in the submit float?

Could it be a normal buffer that allows me to use regular vim motions to edit. (filetype could be set to markdown too).

It is actually a regular buffer and the syntax applied is markdown. It should allow all regular vim motions.

imagen

Would make the editing more intuitive, and not lose work. Similar to how github handles that box. Where you can add a comment, go back to the review, and then edit it until you do the final submission.

Interesting, Ive never used it that way. I will take a look into it, thanks for the suggestion

mmirus commented 2 years ago

Maybe related, maybe not, but I'm seeing this problem that seems similar:

  1. Start writing review
  2. Leave insert mode and enter normal mode
  3. Press the first character of a keybinding sequence
  4. which-key pops up
  5. Review window disappears and all the content is lost
pwntester commented 2 years ago

@mmirus Thanks for the hint, I dont use which-key but it may be incompatibilities.

I will make the comment buffer a regular one (rather than a scratch one) so that the float can be closed and Octo review submit will bring it again if called multiple times. Would that work for you @aareman ?

aareman commented 2 years ago

@pwntester I think that would work. Thank you.

pwntester commented 2 years ago

Nice, closing for now, let me know if you get into any problems

aareman commented 1 year ago

I think that sounds good. How would one close a floating window without losing the buffer?


From: Alvaro Muñoz @.> Sent: Tuesday, April 26, 2022 1:07:48 PM To: pwntester/octo.nvim @.> Cc: Avraham Areman @.>; Mention @.> Subject: Re: [pwntester/octo.nvim] Octo review submit box has strange behavior (#180)

@mmirushttps://github.com/mmirus Thanks for the hint, I dont use which-key but it may be incompatibilities.

I will make the comment buffer a regular one (rather than a scratch one) so that the float can be closed and Octo review submit will bring it again if called multiple times. Would that work for you @aaremanhttps://github.com/aareman ?

— Reply to this email directly, view it on GitHubhttps://github.com/pwntester/octo.nvim/issues/180#issuecomment-1110044294, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACQDVV74G5CJSYNOK6SDXP3VHAPGJANCNFSM5AV6SZ2A. You are receiving this because you were mentioned.Message ID: @.***>

pwntester commented 1 year ago

Just close the window, the buffer will remain open and you should be able to load it in any other window (:ls! should show a list of all buffers)