Skip to content

Respect &splitbelow and &splitright#1031

Merged
deathbeam merged 6 commits intoCopilotC-Nvim:mainfrom
teoljungberg:splitbelow
Mar 18, 2025
Merged

Respect &splitbelow and &splitright#1031
deathbeam merged 6 commits intoCopilotC-Nvim:mainfrom
teoljungberg:splitbelow

Conversation

@teoljungberg
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

@all-contributors add @teoljungberg for code

@allcontributors
Copy link
Copy Markdown
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