Closed shortcuts closed 1 month ago
Referencing your comment here @vinoff as I now properly understood the issue, I believe I can fix that before the next major.
@vinoff would you mind giving a shot to https://github.com/shortcuts/no-neck-pain.nvim/pull/364 and highlight if something still bothers you?
@shortcuts, yes! But there is something weird going on, try to reproduce on your end please:
This last point is weird.. It seems like NNP width decreases.. A small amount, but still. Does this also happen on your end?
It only happens on the first :q though. If I keep doing :q :q :q :q, the size remains constant. But the first :q does change size. I wonder if there is some other plugin that is causing it.
There is a nasty bug @shortcuts:
EDIT: :qa! works though. But :q! should work also.
There is a nasty bug @shortcuts:
- Open nvim (I mean nvim itself, not a file. Just do "nvim", without a file path)
- Edit the window (just add some random text, whatever).
- Do not save.
- Do :q!
- It doesn't close. It should close, since you are doing "!".
EDIT: :qa! works though. But :q! should work also.
Thanks for trying the fix!! this one should've been fixed, for the other resize issue, I'm not able to consistently reproduce it but it might not directly be related to this fix, as I leverage the same solution as for the init of the plugin, I'll continue to investigate
feat released here https://github.com/shortcuts/no-neck-pain.nvim/releases/tag/v1.14.0
There is a nasty bug @shortcuts:
- Open nvim (I mean nvim itself, not a file. Just do "nvim", without a file path)
- Edit the window (just add some random text, whatever).
- Do not save.
- Do :q!
- It doesn't close. It should close, since you are doing "!".
EDIT: :qa! works though. But :q! should work also.
Thanks for trying the fix!! this one should've been fixed, for the other resize issue, I'm not able to consistently reproduce it but it might not directly be related to this fix, as I leverage the same solution as for the init of the plugin, I'll continue to investigate
I confirm that the q! is fixed. The resize still happens to me. Just to be sure, it also happens to you, right? Or is it something on my side?
If it helps, there seems to appear a white dot in the upper right corner of NNP when the resize happens.
I confirm that the q! is fixed. The resize still happens to me. Just to be sure, it also happens to you, right? Or is it something on my side?
If it helps, there seems to appear a white dot in the upper right corner of NNP when the resize happens.
Yes I managed to repro on a big screen but not on my laptop, I guess when I compute the remaining width, there is a .5 offset that sometimes gets rounded or floored, which I'll try to fix also but separately
I think you are misunderstanding the issue @shortcuts. This is how other plugins work, for example neo-tree. I just tested it.
With Neo-tree:
With NNP:
What it should do instead is give a warning, just like Neo-tree does. It should never close the NNP window since it is not focused. If one wants to close the NNP window, one has many ways to do that. Just running :NNP is one, or just creating a keybind. Or just moving focus to the NNP window and doing :q. Now, closing a window with :q while another window is being focused is just bad UX, imo.
Originally posted by @vinoff in https://github.com/shortcuts/no-neck-pain.nvim/issues/361#issuecomment-2126511600