Skip to content

inconsistent selection with block cursor #20121

@andrewbanchich

Description

@andrewbanchich

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

if i set the cursor shape to block and the current position is e.g.

fn |f|oo(self) {}

ctrl-right will produce

fn foo|(|self) {}

while ctrl-shift-right will produce

fn fo|o|(self) {}

the actual selection area for the latter is correct - cutting only removes foo. however, that's confusing for me because the behavior of the former command makes me think that the block cursor's current position is its left, but then when you're using it to select something the actual position is its right.

Environment

Zed: v0.159.7 (Zed)
OS: Linux Wayland ubuntu 24.04
Memory: 30.7 GiB
Architecture: x86_64
GPU: AMD Radeon Graphics (RADV GFX1103_R1) || radv || Mesa 24.0.9-0ubuntu0.2

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:editorFeedback for code editing, formatting, editor iterations, etcarea:ui/animationsInteractions feedback for cursor, actions, scrolling, etcfrequency:alwaysBug that happens for everyone on every platform no matter how they use Zedpriority:P2Average run-of-the-mill bugsstate:needs reproNeeds reproduction steps / someone to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions