Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Opening 3 splits, then going back down to two, disables NoNeckPain completely #408

Open
1 task
fakeharxy opened this issue Oct 4, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@fakeharxy
Copy link

Description

So, first off, love the plugin, it's amazing.

I think I may have just hit an edgecase based on my screen size, but if I start no neck pain, it works, fantastic. Open a second split, it works. Open a third, it still works, lovely. Close that third, and it goes back down to 2 splits, but full screen - my left side buffer has gone (I only use a left side buffer, no right). Rerunning :NoNeckPain has no effect. Doing ctrl-w = has no effect. One thing that does work is closing down my second split - then, with only one split left, no-neck-pain kicks in and works as normal.

I'm guessing I'm just hitting an unfortunate width that means no-neck-pain thinks the screen is too small to have a buffer, but I don't want to decrease the width as it's just how I like it.

Thanks!

Neovim version

0.9.x

Steps to reproduce

  1. Run NNP
  2. Open a split, and again (maybe even again to reproduce)
  3. Close splits down to 2
  4. Buffer is not used.

Relevant log output

No response

Self-service

  • I'd be willing to fix this bug myself.
@fakeharxy fakeharxy added the bug Something isn't working label Oct 4, 2024
@shortcuts
Copy link
Owner

Hey, thanks for using nnp!!

I think I actually just fixed this issue with #409, which is related to #407

In the meantime I'll try to reproduce locally :D

@fakeharxy
Copy link
Author

Hi, thanks for getting back to me so quickly - I've updated to the newest version... it's actually sort of made it worse... sorry!

It definitely re-evalutes what width it should be at what seems like the right time now... but the left hand split (not the NNP buffer, but my left split) always seems to be bigger than it should be - by quite a lot. ctrl-w = does fix it though, until I open another split, and then it evalutes again...

@fakeharxy
Copy link
Author

fakeharxy commented Oct 4, 2024

ahh I've figured it out :) it's to do with not having the right buffer. If I enable the right buffer, it all works as expected. With the right buffer disabled, my left split expands to fit the empty space, and the left NNP buffer is the same size as if they were both there (the left and right NPP buffers). This is ok for me, I can just enable the right pane, no biggie.

I think the bug actually is, tho: If right pane is disabled, make the left pane proportionally bigger

@fakeharxy
Copy link
Author

For the record tho, with left and right NNP buffers enabled, it now works absolutely perfectly, like a dream. I've been looking for this kind of thing for so long... thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants