Skip to content

editor: Fix newline below when selection is at the end of an multibuffer excerpt#49132

Merged
Veykril merged 2 commits intozed-industries:mainfrom
austincummings:fix-newline-below-end-of-multibuffer
Feb 17, 2026
Merged

editor: Fix newline below when selection is at the end of an multibuffer excerpt#49132
Veykril merged 2 commits intozed-industries:mainfrom
austincummings:fix-newline-below-end-of-multibuffer

Conversation

@austincummings
Copy link
Contributor

Switches newline_below from adding a newline to the start of the next line in a multibuffer, to appending a newline at the end of the selections current lines. This keeps the insertion within the excerpt of the selection rather than adding a newline to the excerpt below.

Closes #47965

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • Fixed editor::NewlineBelow adding a newline to the next multibuffer excerpt when selection is at the end of an excerpt

a multibuffer

Switches `newline_below` from adding a newline to the start of the next
line in a multibuffer, to appending a newline at the end of the
selections current lines. This keeps the insertion within the excerpt of
the selection rather than adding a newline to the excerpt below.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 13, 2026
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril enabled auto-merge (squash) February 14, 2026 08:20
@Veykril Veykril disabled auto-merge February 14, 2026 08:20
@Veykril Veykril changed the title Fix newline below when selection is at the end of an multibuffer excerpt editor: Fix newline below when selection is at the end of an multibuffer excerpt Feb 14, 2026
@Veykril Veykril enabled auto-merge (squash) February 14, 2026 08:20
@Veykril Veykril self-assigned this Feb 14, 2026
auto-merge was automatically disabled February 16, 2026 15:37

Head branch was pushed to by a user without write access

@Veykril Veykril enabled auto-merge (squash) February 16, 2026 15:40
auto-merge was automatically disabled February 16, 2026 15:41

Head branch was pushed to by a user without write access

@austincummings austincummings force-pushed the fix-newline-below-end-of-multibuffer branch from 4676a5b to b273b87 Compare February 16, 2026 15:41
@austincummings
Copy link
Contributor Author

Should be passing now! Had to make some changes to not shift around collaborator cursors and group edits by the buffer they belong to.

@Veykril Veykril merged commit 014bf4c into zed-industries:main Feb 17, 2026
27 checks passed
@austincummings austincummings deleted the fix-newline-below-end-of-multibuffer branch February 17, 2026 15:58
rtfeldman pushed a commit that referenced this pull request Feb 17, 2026
…fer excerpt (#49132)

Switches `newline_below` from adding a newline to the start of the next
line in a multibuffer, to appending a newline at the end of the
selections current lines. This keeps the insertion within the excerpt of
the selection rather than adding a newline to the excerpt below.

Closes #47965

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed `editor::NewlineBelow` adding a newline to the next multibuffer
excerpt when selection is at the end of an excerpt
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.

Funky newline below behavior in folding views

2 participants