Skip to content

Mismatched behavior for delete word and subword commands #40110

@gab-txt

Description

@gab-txt

Summary

The DeleteToPreviousSubwordStart command deletes the end of the previous line when deleting an empty line. Similarly, DeleteToNextSubwordEnd deletes the start of the next line.

Description

This PR fixed the behavior of the DeleteToPreviousWordStart and DeleteToNextWordEnd commands, but did not address the corresponding subword commands (DeleteToPreviousSubwordStart and DeleteToNextSubwordEnd), whose behavior is now misaligned.

I have found this related issue, but it was automatically closed last year without being addressed.

Steps to reproduce:

  1. Use DeleteToPreviousSubwordStart or DeleteToNextSubwordEnd on an empty line

Expected Behavior: the line is deleted and no other line is modified
Actual Behavior: the line is deleted and the end of the previous line (if using DeleteToPreviousSubwordStart) or the start of the next line (if using DeleteToNextSubwordEnd) is deleted

Zed Version and System Specs

Zed: v0.203.4 (Zed)
OS: Linux X11 ubuntu 22.04
Memory: 31 GiB
Architecture: x86_64
GPU: Intel(R) Graphics (RPL-P) || Intel open-source Mesa driver || Mesa 23.2.1-1ubuntu3.1~22.04.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:editorFeedback for code editing, formatting, editor iterations, etcfrequency:alwaysBug that happens for everyone on every platform no matter how they use Zedpriority:P3Papercuts, minor issues with a clear workaround, cosmetic bugssize:smallbite-size issuesstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions