ZIm/assets/settings
chico ferreira 5c88e9c66b
terminal: Expose selection in context and add keep_selection_on_copy setting (#33491)
Closes #21262

Introduces a new setting `keep_selection_on_copy`, which controls
whether the current text selection is preserved after copying in the
terminal. The default behavior remains the same (`true`), but setting it
to `false` will clear the selection after the copy operation, matching
VSCode's behavior.

Additionally, the terminal context now exposes a `selection` flag
whenever text is selected.

This allows users to match VSCode and other terminal's smart copy
behavior.

Release Notes:

- Expose `selection` to terminal context when there is text selected in
the terminal
- Add `keep_selection_on_copy` terminal setting. Can be set to false to
clear the text selection when copying text.

**VSCode Behavior Example:**

**settings.json:**
```json
  "terminal": {
    "keep_selection_on_copy": false
  },
```
**keymap.json:**
```json
  {
    "context": "Terminal && selection",
    "bindings": {
      "ctrl-c": "terminal::Copy"
    }
  }
```
2025-07-03 09:37:27 +03:00
..
default.json terminal: Expose selection in context and add keep_selection_on_copy setting (#33491) 2025-07-03 09:37:27 +03:00
initial_debug_tasks.json Simplify debug launcher UI (#31928) 2025-06-02 21:24:08 +00:00
initial_local_debug_tasks.json Simplify debug launcher UI (#31928) 2025-06-02 21:24:08 +00:00
initial_local_settings.json Fix broken link in initial settings (#15119) 2024-07-25 08:25:27 -04:00
initial_server_settings.json Add settings to remote servers, use XDG paths on remote, and enable node LSPs (#19176) 2024-10-15 23:32:44 -07:00
initial_tasks.json Add a run menu (#32505) 2025-06-10 19:57:46 -06:00
initial_user_settings.json Note in initial_user_settings.json how to access the command palette (#17854) 2024-09-15 19:45:48 -04:00