inconsistent selection with block cursor
Check for existing issues
- [X] 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
also, i just noticed that holding shift-right will not move the cursor at all the first time.
Yes, the simpler explanation here is that the block cursor is incorrectly placed when multiple things are selected:
vs the default cursor shape:
When we do a shift-right, the selection DOES correctly update, but the cursor doesn't actually move in Block mode. You can verify that the selection does update by doing shift-right and then backspace -- this will delete the character as you'd expect.
As well, I can confirm that this is platform independent
This issue should be closed in favor of #18588 which is the same issue but with more conversation on it
@sanbox-irl this is a different issue - this issue is about the visualization of the block. the selection is correct.
the issue you linked is about deleting too many characters. also, it's been closed since that has been fixed and this has not been.
Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!
Still happening.