[PR #13358] [MERGED] Miscellaneous bug fixes for Mark Mode #29496

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13358
Author: @carlos-zamora
Created: 6/22/2022
Status: Merged
Merged: 7/1/2022
Merged by: @DHowett

Base: mainHead: dev/cazamor/kbd-sln/polish


📝 Commits (10+)

  • cdbe030 Miscellaneous bug fixes for Mark Mode
  • 654bb08 fix copyOnSelect interactions with keyboard selection
  • 0b54345 Fix a few method signatures
  • 06a39f8 bugfix: correctly show markers when one cell selected
  • 40ee74e Merge branch 'dev/cazamor/kbd-sln/polish' of https://github.com/microsoft/terminal into dev/cazamor/kbd-sln/polish
  • 408fca2 spell fix
  • a2a346b Merge branch 'main' into dev/cazamor/kbd-sln/polish
  • 32ca437 combine mark mode and quick edit mode
  • 0c5a1e9 fix clamping the selection at top/bottom properly
  • c78818a add toggleBlockSelection to schema

📊 Changes

10 files changed (+146 additions, -89 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+1 -0)
📝 src/cascadia/TerminalControl/ControlCore.cpp (+29 -29)
📝 src/cascadia/TerminalControl/ControlCore.h (+3 -2)
📝 src/cascadia/TerminalControl/ControlCore.idl (+18 -3)
📝 src/cascadia/TerminalControl/ControlInteractivity.cpp (+9 -7)
📝 src/cascadia/TerminalControl/TermControl.cpp (+11 -8)
📝 src/cascadia/TerminalCore/Terminal.cpp (+3 -2)
📝 src/cascadia/TerminalCore/Terminal.hpp (+19 -4)
📝 src/cascadia/TerminalCore/TerminalSelection.cpp (+52 -34)
📝 src/cascadia/TerminalSettingsModel/defaults.json (+1 -0)

📄 Description

Summary of the Pull Request

  1. [copy on select] when manually copying text (i.e. kbd or right-click) while in mark/quick-edit mode, we now dismiss the selection.
  2. Enter is now bound to copy by default.
    • This works very well with mark mode and provides a more consistent behavior with conhost's selection experience overall.
    • "why not hardcode Enter as a way to copy when in mark mode?"
      • In an effort to make this as configurable as possible, I decided to make it a configurable keybinding, but am open to suggestions.
  3. selection markers
    a. we now hide the selection markers when multi-clicking the terminal.
    b. selection markers are now properly shown when a single cell selection exists
    • Prior to this PR, any single cell selection would display both markers. Now, we actually track which endpoint we're moving and display the appropriate one.
  4. ensures that when you use keyboard selection to move past the top/bottom of the scroll area, we clamp it to the origin/bottom-right respectively. The fix is also better here in that it provides consistent behavior across all of the _MoveByX functions.
  5. adds toggleBlockSelection to the schema

References

#13053

Validation Steps Performed

Did a whole flowchart of expected behavior with copy on select:

  • enable copyOnSelect
    • make a selection with the mouse
      • right-click should copy the text --> clear the selection --> paste
    • use keyboard selection to quick-edit the existing selection
      • copy action should clear the selection
      • right-click should copy the text --> clear the selection --> paste

Played with selection markers a bit in mark mode and quick edit mode. Markers are updating appropriately.


🔄 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/13358 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 6/22/2022 **Status:** ✅ Merged **Merged:** 7/1/2022 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/cazamor/kbd-sln/polish` --- ### 📝 Commits (10+) - [`cdbe030`](https://github.com/microsoft/terminal/commit/cdbe030eac32dad1005c65bffffe4f6fdaee2b47) Miscellaneous bug fixes for Mark Mode - [`654bb08`](https://github.com/microsoft/terminal/commit/654bb08a4c51852d6382479eb1fdc3a424eecac6) fix copyOnSelect interactions with keyboard selection - [`0b54345`](https://github.com/microsoft/terminal/commit/0b5434583e0de69792af90d6e87e559e8108ea19) Fix a few method signatures - [`06a39f8`](https://github.com/microsoft/terminal/commit/06a39f84ee502c795ec32f25bcd03c946300b32d) bugfix: correctly show markers when one cell selected - [`40ee74e`](https://github.com/microsoft/terminal/commit/40ee74e6229d6540ae768de349ddc0e3a653ef28) Merge branch 'dev/cazamor/kbd-sln/polish' of https://github.com/microsoft/terminal into dev/cazamor/kbd-sln/polish - [`408fca2`](https://github.com/microsoft/terminal/commit/408fca2a190332f71126d0127d1b071b6db25734) spell fix - [`a2a346b`](https://github.com/microsoft/terminal/commit/a2a346bbe51adcbdb15b8ea1aba5e674d820de5e) Merge branch 'main' into dev/cazamor/kbd-sln/polish - [`32ca437`](https://github.com/microsoft/terminal/commit/32ca43770a4789249ae897166482ed0fba2fb3be) combine mark mode and quick edit mode - [`0c5a1e9`](https://github.com/microsoft/terminal/commit/0c5a1e955931a69d34b1f560b2c476148bda51ee) fix clamping the selection at top/bottom properly - [`c78818a`](https://github.com/microsoft/terminal/commit/c78818a587badcea162b932c6e17618388f4e80e) add toggleBlockSelection to schema ### 📊 Changes **10 files changed** (+146 additions, -89 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+1 -0) 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+29 -29) 📝 `src/cascadia/TerminalControl/ControlCore.h` (+3 -2) 📝 `src/cascadia/TerminalControl/ControlCore.idl` (+18 -3) 📝 `src/cascadia/TerminalControl/ControlInteractivity.cpp` (+9 -7) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+11 -8) 📝 `src/cascadia/TerminalCore/Terminal.cpp` (+3 -2) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+19 -4) 📝 `src/cascadia/TerminalCore/TerminalSelection.cpp` (+52 -34) 📝 `src/cascadia/TerminalSettingsModel/defaults.json` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request 1. [copy on select] when manually copying text (i.e. kbd or right-click) while in mark/quick-edit mode, we now dismiss the selection. 2. `Enter` is now bound to copy by default. - This works very well with mark mode and provides a more consistent behavior with conhost's selection experience overall. - "why not hardcode `Enter` as a way to copy when in mark mode?" - In an effort to make this as configurable as possible, I decided to make it a configurable keybinding, but am open to suggestions. 3. selection markers a. we now hide the selection markers when multi-clicking the terminal. b. selection markers are now properly shown when a single cell selection exists - Prior to this PR, any single cell selection would display both markers. Now, we actually track which endpoint we're moving and display the appropriate one. 4. ensures that when you use keyboard selection to move past the top/bottom of the scroll area, we clamp it to the origin/bottom-right respectively. The fix is also better here in that it provides consistent behavior across all of the `_MoveByX` functions. 5. adds `toggleBlockSelection` to the schema ## References #13053 ## Validation Steps Performed Did a whole flowchart of expected behavior with copy on select: - enable `copyOnSelect` - make a selection with the mouse - ✅ right-click should copy the text --> clear the selection --> paste - use keyboard selection to quick-edit the existing selection - ✅ `copy` action should clear the selection - ✅ right-click should copy the text --> clear the selection --> paste Played with selection markers a bit in mark mode and quick edit mode. Markers are updating appropriately. --- <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:35:16 +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#29496