Skip to content

Block cursor position is inconsistent with highlighting #36677

@nathansizemore

Description

@nathansizemore

Summary

Block cursors position (where the normal line/I-beam would be) is different when selections are highlighted.

Description

When using the block cursor doing things without selection work as expected (the left hand side of the block cursor is treated as the normal i-beam/line position). However when highlighting or selecting multiple characters or a line of text, the right hand side of the block cursor is treated as the position.

Steps to reproduce:

  1. Type 'asdf' into the editor
  2. Hit home/end.
  3. Do the same with shift held down.

Expected Behavior:
The block cursor should act the same, regardless of selecting with motion

Actual Behavior:
Home/end without shift held down move to to start/end as expected. When shift is held down, end moves the block cursor 1 position shy, but still grabs all the text.

Zed Version and System Specs

Zed: v0.200.4 (Zed)
OS: Linux X11 pop 22.04
Memory: 31.3 GiB
Architecture: x86_64
GPU: AMD Radeon VII (RADV VEGA20) || radv || Mesa 24.2.8-1bpo12+1pop1174422582622.04b077665

Metadata

Metadata

Assignees

Labels

area:editorFeedback for code editing, formatting, editor iterations, etcfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcpriority: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

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions