zed/assets
Peter Tripp 735849e201
Improve Editor::DuplicateSelection (#21976)
Improves the new `Editor::DuplicateSelection` @CharlesChen0823 added in
https://github.com/zed-industries/zed/pull/21154.

- Merge `duplicate_selection` and `duplicate_line` into single function.
- Add keyboard shortcuts to JetBrains and SublimeText keymaps.
- If the selection is empty (e.g. just a cursor) make
`Editor::DuplicateSelection` fallback to being the same as
`Editor::DuplicateLineDown`.
- Tested with multiple cursors and for multiple selections.

| Editor      | Action              | macOS       | Linux        |
| ----------- | ------------------- | ----------- | ------------ |
| VSCode      | Duplicate Selection |             |              |
| JetBrains   | Duplicate Selection | cmd-d       | ctrl-d       |
| XCode       | Duplicate           | cmd-d       | N/A          |
| SublimeText | duplicate_line      | cmd-shift-d | ctrl-shift-d |

This matches behavior of the `duplicate` functionality in all other
major editors, with one exception: other editors change the selection so
that the newly duplicated object, current Zed behavior leaves the
original selection unchanged (TODO?)
2024-12-13 16:32:33 -05:00
..
fonts Fix font selection on macOS (#13615) 2024-06-27 17:02:45 -06:00
icons Add metal icon (#21720) 2024-12-12 15:23:20 -08:00
images add ui::Vector and separate images from icons (#17815) 2024-09-13 17:44:16 -04:00
keymaps Improve Editor::DuplicateSelection (#21976) 2024-12-13 16:32:33 -05:00
prompts Require /file or /tab when using Suggest Edits (#19960) 2024-10-30 11:38:43 -04:00
settings editor: Add debounce setting for triggering DocumentHighlight (#21702) 2024-12-12 15:37:58 -08:00
sounds
themes Update panel.focused_border token across themes (#21612) 2024-12-06 09:17:34 -03:00