Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-cursor "drag" is not working #6423

Open
1 task done
wgordon17 opened this issue Jan 24, 2024 · 7 comments
Open
1 task done

Multi-cursor "drag" is not working #6423

wgordon17 opened this issue Jan 24, 2024 · 7 comments
Labels
bug [core label] editor Feedback for code editing, formatting, editor iterations, etc keymap / key binding Feedback for keyboard shortcuts, key mapping, etc

Comments

@wgordon17
Copy link

Check for existing issues

  • 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 wgordon17 added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Jan 24, 2024
@maxbrunsfeld
Copy link
Collaborator

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.

@JosephTLyons
Copy link
Collaborator

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

@JosephTLyons JosephTLyons added editor Feedback for code editing, formatting, editor iterations, etc keymap / key binding Feedback for keyboard shortcuts, key mapping, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jan 25, 2024
@wgordon17
Copy link
Author

@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

@ipearx
Copy link

ipearx commented Feb 7, 2024

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...

Copy link

Hi there! 👋
We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. Are you able to reproduce this issue in the latest version of Zed? If so, please let us know by commenting on this issue and we will keep it open; otherwise, we'll close it in a week. Feel free to open a new issue if you're seeing this message after the issue has been closed.
Thanks for your help!

@github-actions github-actions bot added the stale Label used by `stale` action label Sep 24, 2024
@wgordon17
Copy link
Author

Still reproducible

@github-actions github-actions bot removed the stale Label used by `stale` action label Sep 24, 2024
@omergoktas
Copy link

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

Why do we have to press shift additionally to drag and select multiple lines? Why simply pressing alt is not enough? I can't even modify this weird behavior. My settings are as follows:

{
  // The key to use for adding multiple cursors
  // Currently "alt" or "cmd_or_ctrl"  (also aliased as
  // "cmd" and "ctrl") are supported.
  "multi_cursor_modifier": "alt"
}

See? -it is not alt+shift or something; it's just alt. Plus, look at this other weird behavior; when the cursor is at the end of the line, the multiline drag assumes that I want to start selecting from the end of the line instead of where I click on to start dragging:

Ekran.Kaydi.2024-12-28.18.15.53.mov

There are two separate bugs as far as I am concered. Pressing shift should not be mandatory, and the multiline selection should start from where I click on.

Also, multi_cursor_modifier setting is not even documented here; just so you know.

Thanks in advance, and sorry if I was mistaken at anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] editor Feedback for code editing, formatting, editor iterations, etc keymap / key binding Feedback for keyboard shortcuts, key mapping, etc
Projects
None yet
Development

No branches or pull requests

5 participants