Skip to content

Yank around paragraph: empty line missing #28804

@kraftwer1

Description

@kraftwer1

Summary

Yank around paragraph trims empty line at the end.

Description

I originally thought this was intentional and brought it up here (#28769), but a nice fellow suspected that this might actually be a bug.

Consider this text file:

this is a one liner

this
is a
paragraph

this is a one liner

Steps to reproduce:

  1. place your cursor somewhere within the paragraph
  2. hit "yap"
  3. place the cursor on the empty line between the paragraph and the one liner
  4. hit "p"

Expected Behavior (like Vim):

this is a one liner

this
is a
paragraph

this
is a
paragraph

this is a one liner

Actual Behavior:

It has omitted the blank line.

this is a one liner

this
is a
paragraph

this
is a
paragraph
this is a one liner

Zed Version and System Specs

Zed: v0.181.8 (Zed)
OS: macOS 15.4.0
Memory: 24 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:parity/vimFeedback for Vim parity featuresfrequency:alwaysBug that happens for everyone on every platform no matter how they use Zedstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions