[PR #13053] [MERGED] Introduce Mark Mode #29355

Open
opened 2026-01-31 09:34:25 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13053
Author: @carlos-zamora
Created: 5/7/2022
Status: Merged
Merged: 5/21/2022
Merged by: @undefined

Base: mainHead: dev/cazamor/kbd-sln/classic-mark-mode


📝 Commits (8)

📊 Changes

15 files changed (+121 additions, -15 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+1 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+10 -0)
📝 src/cascadia/TerminalControl/ControlCore.cpp (+22 -2)
📝 src/cascadia/TerminalControl/ControlCore.h (+2 -0)
📝 src/cascadia/TerminalControl/ControlCore.idl (+2 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+7 -2)
📝 src/cascadia/TerminalControl/TermControl.h (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.idl (+1 -0)
📝 src/cascadia/TerminalCore/Terminal.cpp (+2 -1)
📝 src/cascadia/TerminalCore/Terminal.hpp (+5 -2)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+59 -7)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+2 -0)
📝 src/cascadia/TerminalSettingsModel/AllShortcutActions.h (+2 -1)
📝 src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw (+4 -0)
📝 src/cascadia/TerminalSettingsModel/defaults.json (+1 -0)

📄 Description

Summary of the Pull Request

Introduces a non-configurable version of mark mode to Windows Terminal. It has the following interactions defined:

  • ctrl+shift+m --> Enter Mark Mode
  • when in Mark Mode...
    • ESC --> Exit Mark Mode
    • arrow keys --> move "start"
    • shift + arrow keys --> anchor "start", move "end"
    • ctrl+a --> select all
  • when a selection is active...

When in mark mode, the cursor does not blink.

References

#4993 - [Epic] Keyboard Selection

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • TermControl:
    • TermControl.cpp just adds logic to prevent the cursor from blinking when in mark mode
  • ControlCore
    • in the same place we handle quick edit, we add an entry point to mark mode
  • TerminalCore
    • this leverages UpdateSelection() and other quick edit functions to make mark mode happen

Validation Steps Performed

  • Make selection, split pane, close pane
    • NOTE: A similar scenario caused a crash at one point. Really weird. Keep an eye on it.
  • Cursor is off when in mark mode
  • general movement/selection
  • general movement/selection that forces the viewport to move
  • In mark mode, selectAll...
    • arrow keys --> move start
    • shift + arrow keys --> move end
  • (regardless of mark mode) if selection active, enter --> copy to clipboard

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/13053 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 5/7/2022 **Status:** ✅ Merged **Merged:** 5/21/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/cazamor/kbd-sln/classic-mark-mode` --- ### 📝 Commits (8) - [`2f4a1c5`](https://github.com/microsoft/terminal/commit/2f4a1c5a5ecb55de2a97d69ecbc26e39b89bf394) Introduce Mark Mode - [`262a6bb`](https://github.com/microsoft/terminal/commit/262a6bb379faf606ab08537fc00ceae0f70d75cf) make mark mode an action - [`c9e28cb`](https://github.com/microsoft/terminal/commit/c9e28cb90a92700de3bf444b0dce8e6cc9153658) update schema; fix deadlock - [`2d71c2c`](https://github.com/microsoft/terminal/commit/2d71c2c0176278e008fb42fd6946ab17acd3a5b5) fix a few nits - [`75faa5d`](https://github.com/microsoft/terminal/commit/75faa5dd0815febf6989466c3659df9750df4278) remove 'Enter' --> copy in Mark Mode - [`f302605`](https://github.com/microsoft/terminal/commit/f302605ff487edcf7dc5c378dfa9da3ea65baafd) address PR feedback - [`4a19d6b`](https://github.com/microsoft/terminal/commit/4a19d6b36eb8c8e3f0755b59cec601be26601b05) apply Leonard's suggestions - [`9564090`](https://github.com/microsoft/terminal/commit/95640907418f47e0f05020a66b14eec89b01c78e) fix ctrl+a --> select all in mm ### 📊 Changes **15 files changed** (+121 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+1 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+10 -0) 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+22 -2) 📝 `src/cascadia/TerminalControl/ControlCore.h` (+2 -0) 📝 `src/cascadia/TerminalControl/ControlCore.idl` (+2 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+7 -2) 📝 `src/cascadia/TerminalControl/TermControl.h` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.idl` (+1 -0) 📝 `src/cascadia/TerminalCore/Terminal.cpp` (+2 -1) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+5 -2) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+59 -7) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/AllShortcutActions.h` (+2 -1) 📝 `src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw` (+4 -0) 📝 `src/cascadia/TerminalSettingsModel/defaults.json` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request Introduces a non-configurable version of mark mode to Windows Terminal. It has the following interactions defined: - <kbd>ctrl+shift+m</kbd> --> Enter Mark Mode - when in Mark Mode... - <kbd>ESC</kbd> --> Exit Mark Mode - arrow keys --> move "start" - <kbd>shift</kbd> + arrow keys --> anchor "start", move "end" - <kbd>ctrl+a</kbd> --> select all - when a selection is active... When in mark mode, the cursor does not blink. ## References #4993 - [Epic] Keyboard Selection ## PR Checklist * [X] Closes #715 * [X] Provides a resolution for #11985 ## Detailed Description of the Pull Request / Additional comments - `TermControl`: - `TermControl.cpp` just adds logic to prevent the cursor from blinking when in mark mode - `ControlCore` - in the same place we handle quick edit, we add an entry point to mark mode - `TerminalCore` - this leverages `UpdateSelection()` and other quick edit functions to make mark mode happen ## Validation Steps Performed - [x] Make selection, split pane, close pane - NOTE: A similar scenario caused a crash at one point. Really weird. Keep an eye on it. - [x] Cursor is off when in mark mode - [x] general movement/selection - [x] general movement/selection that forces the viewport to move - [x] In mark mode, selectAll... - [x] arrow keys --> move start - [x] shift + arrow keys --> move end - [x] (regardless of mark mode) if selection active, enter --> copy to clipboard --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:34:25 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29355