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
..
2025-07-02 21:14:33 -04:00
2025-07-02 20:32:07 +00:00
2025-07-01 00:46:01 -06:00
2025-07-02 21:14:33 -04:00
2025-06-30 21:01:32 -06:00
2025-06-17 14:39:45 +00:00
2025-05-20 23:06:07 +00:00
2025-06-30 21:01:32 -06:00
2025-05-21 09:27:54 +00:00
2025-06-26 20:54:19 +02:00
2025-07-02 20:32:07 +00:00
2025-06-30 21:01:32 -06:00
2025-05-26 21:20:41 -03:00
2025-07-02 21:14:33 -04:00
2025-05-20 23:06:07 +00:00
2025-07-02 21:14:33 -04:00
2025-07-01 12:51:09 +03:00
2025-05-30 08:32:54 -07:00
2025-06-26 20:54:19 +02:00
2025-06-30 23:34:25 +00:00
2025-06-24 05:14:15 +00:00
2025-06-22 16:23:17 -04:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:36:12 -06:00
2025-07-02 21:14:33 -04:00
2025-06-30 19:25:11 -04:00
2025-06-05 12:59:22 +00:00
2025-06-30 08:05:52 +00:00
2025-07-02 21:14:33 -04:00
2025-06-30 21:07:28 +00:00
2025-07-02 16:37:52 -04:00
2025-06-15 19:51:04 +00:00
2025-06-23 17:06:48 +00:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-06-25 09:42:30 +02:00
2025-07-02 21:14:33 -04:00
2025-06-24 04:34:51 +00:00
2025-07-02 21:14:33 -04:00
2025-07-01 09:14:59 -07:00
2025-06-21 11:19:23 -04:00
2025-07-01 20:02:12 +00:00
2025-06-27 15:34:21 -04:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-06-17 13:56:19 -06:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-06-26 20:54:19 +02:00
2025-06-18 16:01:28 +05:30
2025-07-02 21:14:33 -04:00
2025-06-03 12:23:01 -04:00
2025-07-02 21:14:33 -04:00
2025-06-27 14:31:31 -06:00
2025-06-17 20:26:27 +00:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-05-20 23:06:07 +00:00
2025-06-28 23:41:44 +02:00
2025-06-03 13:18:29 +02:00
2025-06-18 16:01:28 +05:30
2025-06-20 21:28:48 +00:00
2025-07-02 21:14:33 -04:00
2025-06-06 20:54:00 +00:00
2025-07-02 21:14:33 -04:00
2025-06-18 16:01:28 +05:30
2025-07-02 21:14:33 -04:00
2025-07-03 00:21:39 +00:00
2025-06-25 19:57:28 +03:00
2025-07-01 11:12:51 +00:00
2025-07-01 13:29:43 +00:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-07-02 16:37:36 -04:00
2025-05-20 23:06:07 +00:00
2025-06-25 21:00:33 -04:00
2025-06-17 10:43:07 -04:00
2025-06-30 21:07:28 +00:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-05-20 23:06:07 +00:00
2025-07-02 21:14:33 -04:00
2025-07-01 14:21:26 -04:00
2025-06-17 10:43:07 -04:00
2025-06-26 20:54:19 +02:00
2025-06-06 16:00:09 +00:00
2025-06-23 19:55:21 -03:00
2025-06-17 10:43:07 -04:00
2025-06-28 14:38:27 +02:00
2025-06-21 08:03:50 +02:00
2025-06-27 14:31:31 -06:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-06-14 21:39:54 -06:00
2025-07-02 21:14:33 -04:00
2025-07-02 08:44:14 +00:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-06-27 14:31:31 -06:00
2025-06-18 16:01:28 +05:30
2025-07-02 20:51:19 +03:00
2025-06-27 15:46:04 +00:00
2025-05-26 17:43:57 +00:00
2025-05-23 14:53:53 +00:00
2025-06-25 16:49:37 +00:00
2025-07-03 01:04:27 +00:00
2025-07-02 21:14:33 -04:00
2025-07-02 10:05:34 -04:00
2025-06-09 13:11:57 +02:00
2025-06-17 12:09:08 +02:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-06-13 06:32:29 +00:00
2025-05-20 23:06:07 +00:00
2025-07-03 00:21:39 +00:00
2025-07-02 21:14:33 -04:00
2025-05-20 23:06:07 +00:00
2025-06-30 23:34:25 +00:00
2025-07-02 21:14:33 -04:00
2025-05-20 23:06:07 +00:00
2025-07-01 15:43:39 +00:00
2025-06-09 13:11:57 +02:00
2025-07-02 21:14:33 -04:00
2025-06-17 14:39:45 +00:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-07-02 13:07:09 -04:00
2025-06-27 14:31:31 -06:00
2025-07-03 09:37:27 +03:00
2025-07-03 09:37:27 +03:00
2025-06-09 13:11:57 +02:00
2025-07-03 00:21:39 +00:00
2025-06-26 20:54:19 +02:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-07-02 19:48:49 -03:00
2025-07-01 15:43:39 +00:00
2025-05-23 19:31:25 +00:00
2025-06-27 15:46:04 +00:00
2025-06-21 11:19:23 -04:00
2025-06-13 06:32:29 +00:00
2025-06-25 13:26:41 +00:00
2025-07-02 21:14:33 -04:00
2025-06-18 21:26:12 +00:00
2025-06-09 13:11:57 +02:00
2025-06-30 21:01:32 -06:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-06-26 20:54:19 +02:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-07-02 21:14:33 -04:00
2025-06-06 00:49:30 -06:00