zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.35k stars 2.88k forks source link

vim mode: repeated "<" command behaves incorrectly #12774

Closed distractedm1nd closed 4 months ago

distractedm1nd commented 4 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When using indentation commands <, >, they work as expected when used in isolation.

When prefixing the command with a number, for example, 4>, it ignores the prefix and only indents once.

When trying to repeat the command using ".", the lines get jumbled with different indentations. This is because after repeating the command, the cursor does not always return to the initial position. It often jumps to a random line within the previous selection.

Environment

Zed: v0.137.3 (Zed) OS: macOS 14.1.0 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

janko commented 4 months ago

Seems like a duplicate of https://github.com/zed-industries/zed/issues/12351. It will most likely be fixed by https://github.com/zed-industries/zed/pull/12582.

Moshyfawn commented 4 months ago

I'm going to optimistically close this issue, as it does indeed look like a dupe that might've been fixed by the PR mentioned above. Be sure to follow up if the issue persists and we can reopen it.

Duplicate of:

zeux commented 3 months ago

This doesn't appear to be a duplicate and should probably be reopened. On latest master, I can confirm that using . to repeat indent/deindent does work, but using a number before </> still doesn't actually repeat the action specified number of times.

silvenon commented 3 months ago

Not only does repeating < and > not work, but also my Zed becomes unresponsive for quite a while.

That's a different issue, though, so you can follow that in #14094.