zed icon indicating copy to clipboard operation
zed copied to clipboard

Number of selected characters is wrong in vim linewise visual mode

Open hferreiro opened this issue 10 months ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

When selecting a line with V, all the characters of the line should appear as selected in the status bar. Instead, "1 character" is shown, and that number is changed when moving horizontally.

Environment

Zed: v0.131.6 (Zed) OS: macOS 14.4.1 Memory: 32 GiB Architecture: aarch64

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

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

hferreiro avatar Apr 18 '24 13:04 hferreiro

Hey @hferreiro - I'm not very familar with Vim - but I'm not able to reproduce this on my end, given the actions I assume you took. Can you explain how you are selecting the line once in visual line mode?

JosephTLyons avatar Apr 19 '24 20:04 JosephTLyons

@JosephTLyons just press shift+v. That will enter visual mode with the whole line selected.

hferreiro avatar Apr 22 '24 08:04 hferreiro

I am able to reproduce your issue. That character count is if the number of characters between when you started the selection and your current position (like a traditional cursor selection). The character count should instead reflect the displayed selection.

https://github.com/zed-industries/zed/assets/145113/e3ef77ff-a662-4a01-8475-d487bd704569

notpeter avatar Jun 26 '24 01:06 notpeter