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

Initial pass on reusing existing panes when splitting #25030

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

carlsverre
Copy link

@carlsverre carlsverre commented Feb 17, 2025

This PR adds an optional argument to pane::Split* actions called use_existing. This argument defaults to false. When it is true, Zed will try to split the active item of the current pane into an existing pane in the designated Split direction.

Open questions/further work:

  • Implement this feature for terminal_panel and editor::GoToXSplit actions
  • Consider implementing this feature for other actions?
  • Do folks like the argument name "use_existing"? Is it clear enough?

Closes #24889

Release Notes:

  • Added use_existing optional argument to pane::Split* actions, allowing existing panes to be reused

This PR adds an optional argument to `pane::Split*` actions called
`use_existing`. This argument defaults to false. When it is true, Zed
will try to split the active item of the current pane *into* an existing
pane in the designated Split direction.

Open questions/further work:
* Implement this feature for terminal_panel
* Consider implementing this feature for other actions?
* Do folks like the argument name "use_existing"? Is it clear enough?
Copy link

cla-bot bot commented Feb 17, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @carlsverre on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@carlsverre
Copy link
Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 17, 2025
Copy link

cla-bot bot commented Feb 17, 2025

The cla-bot has been summoned, and re-checked this pull request!

@carlsverre
Copy link
Author

Just saw that actions were run! Appreciate that. Although tests aren't working yet. Wanted to get some signal on my approach before finishing the PR up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant