Fix yank around paragraph missing newline#43583
Merged
dinocosta merged 4 commits intozed-industries:mainfrom Dec 3, 2025
Merged
Fix yank around paragraph missing newline#43583dinocosta merged 4 commits intozed-industries:mainfrom
dinocosta merged 4 commits intozed-industries:mainfrom
Conversation
Other linewise objects like EntireFile and Method (when around=true) also work correctly. Non-linewise objects will still use MotionKind::Exclusive
Member
|
Thank you @van-sprundel ! The approach seems sensible to me 🙂 I've pushed a single commit ed980ed to leverage the existing |
CherryWorm
pushed a commit
to CherryWorm/zed
that referenced
this pull request
Dec 16, 2025
Use `MotionKind::LineWise` in both `vim::normal::change::Vim.change_object` and `vim::normal::yank::Vim.yank_object` when dealing with objects that target `Mode::VisualLine`, for example, paragraphs. This fixes an issue where yanking and changing paragraphs would not include the trailing newline character. Closes zed-industries#28804 Release Notes: - Fixed linewise text object operations (`yap`, `cap`, etc.) omitting trailing blank line in vim mode --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
someone13574
pushed a commit
to someone13574/zed
that referenced
this pull request
Dec 16, 2025
Use `MotionKind::LineWise` in both `vim::normal::change::Vim.change_object` and `vim::normal::yank::Vim.yank_object` when dealing with objects that target `Mode::VisualLine`, for example, paragraphs. This fixes an issue where yanking and changing paragraphs would not include the trailing newline character. Closes zed-industries#28804 Release Notes: - Fixed linewise text object operations (`yap`, `cap`, etc.) omitting trailing blank line in vim mode --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
MotionKind::LineWisein bothvim::normal::change::Vim.change_objectandvim::normal::yank::Vim.yank_objectwhen dealing with objects thattarget
Mode::VisualLine, for example, paragraphs. This fixes an issuewhere yanking and changing paragraphs would not include the trailing
newline character.
Closes #28804
Release Notes:
yap,cap, etc.) omitting trailing blank line in vim mode