ZIm/assets
Daniel Sauble 1569b662ff
editor: Change drag_and_drop_selection cursor on delay elapsed + Add drag_and_drop_selection delay setting (#33928)
When [`drag_and_drop_selection` is
true](https://zed.dev/docs/configuring-zed#drag-and-drop-selection),
users can make a selection in the buffer and then drag and drop it to a
new location. However, the editor forces users to wait 300ms after mouse
down before dragging. If users try to drag before this delay has
elapsed, they will create a new text selection instead, which can create
the impression that drag and drop does not work.

I made two changes to improve the UX of this feature:

* If users do not want a delay before drag and drop is enabled, they can
set the `drag_and_drop_selection.delay_ms` setting to 0.
* If the user has done a mouse down on a text selection, the cursor
changes to a copy affordance as soon as the configured delay has
elapsed, rather than waiting for them to start dragging. This way they
don't need to guess at when the delay has elapsed.

The default settings for this feature are now:

```
"drag_and_drop_selection": {
  "enabled": true,
  "delay_ms": 300
}
```

Closes #33915 

Before:


https://github.com/user-attachments/assets/7b2f986f-9c67-4b2b-a10e-757c3e9c934b

After:


https://github.com/user-attachments/assets/726d0dbf-e58b-41ad-93d2-1a758640b422

Release Notes:

- Migrate `drag_and_drop_selection` setting to
`drag_and_drop_selection.enabled`.
- Add `drag_and_drop_selection.delay_ms` setting to configure the delay
that must elapse before drag and drop is allowed.
- Show a ready to drag cursor affordance as soon as the delay has
elapsed

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2025-07-09 12:38:23 +05:30
..
fonts Fix font selection on macOS (#13615) 2024-06-27 17:02:45 -06:00
icons Improve the LSP popover menu design (#34081) 2025-07-08 19:51:24 -03:00
images debugger: Add onboarding modal (#32961) 2025-06-18 18:44:02 +00:00
keymaps vim: Add U to undo last line (#33571) 2025-07-08 21:24:43 -06:00
prompts Include full abs paths of worktrees in system prompt (#32725) 2025-06-15 15:45:26 +02:00
settings editor: Change drag_and_drop_selection cursor on delay elapsed + Add drag_and_drop_selection delay setting (#33928) 2025-07-09 12:38:23 +05:30
sounds agent: Add sound notification when done generating (#31472) 2025-05-26 21:20:41 -03:00
themes One Light Theme: Change constant color (#33166) 2025-06-21 12:43:02 -04:00