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

Disables on horizontal split #81

Closed
cloudlena opened this issue Dec 20, 2022 · 1 comment · Fixed by #92
Closed

Disables on horizontal split #81

cloudlena opened this issue Dec 20, 2022 · 1 comment · Fixed by #92
Labels
enhancement New feature or request

Comments

@cloudlena
Copy link

Description

The plugin shows the expected behavior when running :vsplit (i.e., it exits "centered" mode until I close the second vertical split).
However, I would not expect the plugin to exit "centered" mode, when :split is being run, as that doesn't require any additional horizontal space.

Steps to reproduce

  1. Run :NoNeckPain
  2. Run :split
  3. The plugin exits "centered" mode

Expected behavior

I would expect the plugin to remain in "centered" mode until I run :vsplit.

Environment

  • Neovim: 0.8.x
@shortcuts shortcuts added the enhancement New feature or request label Dec 20, 2022
@shortcuts
Copy link
Owner

Hey, thanks for the request! Definitely agree with the suggestion :)

shortcuts added a commit that referenced this issue Dec 22, 2022
## 📃 Summary

closes #81

a normal split won't disable NNP during the split anymore, which wasn't
an expected behavior. This prevents big UI shift when opening splits.

Vsplits are unchanged.

## 📸 Preview

`vsplit`:

<img width="1280" alt="Screenshot 2022-12-22 at 01 15 34"
src="https://user-images.githubusercontent.com/20689156/209027684-7bd1ee02-583e-45ec-8dde-832763c7ef52.png">

`split`:

<img width="1280" alt="Screenshot 2022-12-22 at 01 16 01"
src="https://user-images.githubusercontent.com/20689156/209027712-fcd0f3a5-11f1-4079-97cf-b22cd7153ba4.png">


`split` and `vsplit`:

<img width="1280" alt="Screenshot 2022-12-22 at 01 16 16"
src="https://user-images.githubusercontent.com/20689156/209027750-e49b896d-b09b-4e50-87b3-59c52a85c840.png">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants