[PR #13358] Miscellaneous bug fixes for Mark Mode #29501

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

Original Pull Request: https://github.com/microsoft/terminal/pull/13358

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13358 **State:** closed **Merged:** Yes --- ## 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.
claunia added the pull-request label 2026-01-31 09:35:17 +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#29501