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

Respect &splitbelow and &splitright #1031

Merged
merged 6 commits into from
Mar 18, 2025

Conversation

teoljungberg
Copy link
Contributor

@teoljungberg teoljungberg commented Mar 18, 2025

This commit changes the split behavior to respect to the value of
&splitbelow and &splitright, which are both disabled by default.

This behavior was introduced in #950.

This commit changes the horizontal split behavior to respect to the
value of &splitbelow, which defaults to being disabled.

This behavior was introduced in CopilotC-Nvim#950.
@deathbeam
Copy link
Collaborator

Shouldnt this then use topleft when splitbelow is not set? and same for splitting vertically with splitright?

@deathbeam deathbeam added the bug Something isn't working label Mar 18, 2025
@teoljungberg
Copy link
Contributor Author

Shouldnt this then use topleft when splitbelow is not set? and same for splitting vertically with splitright?

It works with :split by default, but I can add topleft to the codepaths to clarify if you want to!

@deathbeam
Copy link
Collaborator

Shouldnt this then use topleft when splitbelow is not set? and same for splitting vertically with splitright?

It works with :split by default, but I can add topleft to the codepaths to clarify if you want to!

Are you sure? The point of botright/topleft is to make full width/full height split. So if you have 2 splits and you open copilot chat, it makes full widht/full height split properly instead of making smaller split inside of your current window

@teoljungberg teoljungberg changed the title Respect &splitbelow Respect &splitbelow and &splitright Mar 18, 2025
@teoljungberg
Copy link
Contributor Author

Pushed to respect both &splitbelow and &splitright, and to use topleft when either are not set.

What this what you had in mind @deathbeam ?

@deathbeam
Copy link
Collaborator

deathbeam commented Mar 18, 2025

yes this looks good to me thanks

@deathbeam deathbeam merged commit 4843ad0 into CopilotC-Nvim:main Mar 18, 2025
1 check passed
@deathbeam
Copy link
Collaborator

@all-contributors add @teoljungberg for code

Copy link
Contributor

@deathbeam

I've put up a pull request to add @teoljungberg! 🎉

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

Successfully merging this pull request may close these issues.

2 participants