zed icon indicating copy to clipboard operation
zed copied to clipboard

Multi-cursor "drag" is not working

Open wgordon17 opened this issue 1 year ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

The features page describes multi-cursor editing as being available with

the mouse by alt-clicking/dragging

I am successfully able to hold the "option" key and click in several places to get multiple cursors, however holding the "option" key and dragging the mouse performs a "normal" select operation, and does not create multiple cursors.

Environment

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

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

wgordon17 avatar Jan 24 '24 19:01 wgordon17

When you have 1 or more selection, you can add a new selection by holding down alt and dragging over a new range in the editor.

maxbrunsfeld avatar Jan 24 '24 19:01 maxbrunsfeld

Hey @wgordon17, what happens if you hold down shift-opt, then start your drag?

JosephTLyons avatar Jan 25 '24 06:01 JosephTLyons

@JosephTLyons that definitely helps, adding in shift. This is definitely an improvement, but it's still slightly...off from my expectations. shift-opt assumes that I want all cursors in the same column, but if I'm trying to drag-to-add multi-cursors at the end of all lines, then things go weird. If I start on a line that's too long, it'll just skip the shorter lines altogether. And if I start on a line that's too short, then it will select the text that's longer while also placing the cursor at the end of the line

wgordon17 avatar Jan 25 '24 18:01 wgordon17

This thwarted me to, I'd expect it to behave like Sublime:

  • Dragging vertically while holding option should add multiple cursors
  • Dragging vertically while holding option past the end of multiple lines should put multiple cursors at the end of the line
  • Dragging while holding option diagonally should add multiple cursors and select the region

One thing that sublime does that's annoying that could be an improvement:

  • I use line wrap on most of the time, it would be great if the multi-cursor select could skip the wrapped lines, i.e. treat them like they aren't wrapped. I may be asking for the impossible here...

ipearx avatar Feb 07 '24 12:02 ipearx