[PR #14995] [MERGED] Add options to enable and disable read only mode #30331

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14995
Author: @Swinkid
Created: 3/14/2023
Status: ✅ Merged
Merged: 3/22/2023
Merged by: @zadjii-msft

Base: main ← Head: dev/swinkid/readonly-actions


📝 Commits (10+)

  • f0a2419 Add options to enable and disable read only mode
  • e9fcd4e Add missing handlers and shortcut actions
  • f1e9d94 Add missing elements and add missing comments
  • fa5e51b Merge branch 'main' into dev/swinkid/readonly-actions
  • 2d7ceca Merge branch 'main' into dev/swinkid/readonly-actions
  • 2035e7c Refactored Enable/Disable functions to Set function. Incorporated changed from PR.
  • 7fa1579 Running Invoke-CodeFormat
  • 2990281 Update src/cascadia/TerminalControl/ControlCore.cpp
  • 1670299 Update TerminalTab.cpp
  • 13445d7 Merge branch 'dev/swinkid/readonly-actions' of https://github.com/Swinkid/terminal into dev/swinkid/readonly-actions

📊 Changes

13 files changed (+89 additions, -2 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+22 -0)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+34 -2)
📝 src/cascadia/TerminalApp/TerminalTab.h (+2 -0)
📝 src/cascadia/TerminalControl/ControlCore.cpp (+5 -0)
📝 src/cascadia/TerminalControl/ControlCore.h (+1 -0)
📝 src/cascadia/TerminalControl/ControlCore.idl (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+8 -0)
📝 src/cascadia/TerminalControl/TermControl.h (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.idl (+1 -0)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+4 -0)
📝 src/cascadia/TerminalSettingsModel/AllShortcutActions.h (+2 -0)
📝 src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw (+6 -0)
📝 src/cascadia/TerminalSettingsModel/defaults.json (+2 -0)

📄 Description

Summary of the Pull Request

PR adds functionality to enable or disable readOnly mode within panes. This functionality is different to toggling as if you call the same functionality twice, it will not toggle between states.

References and Relevant Issues

Validation Steps Performed

  • Checked readOnly is enabled when command triggered
  • Checked readOnly is enabled when command triggered while read only already enabled
  • Checked readOnly is disabled when command triggered while read only is enabled
  • Checked readOnly stays disabled when command triggered while read only is disabled
  • Checked above with multiple tabs and split panes

PR Checklist


🔄 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/14995 **Author:** [@Swinkid](https://github.com/Swinkid) **Created:** 3/14/2023 **Status:** ✅ Merged **Merged:** 3/22/2023 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `main` ← **Head:** `dev/swinkid/readonly-actions` --- ### 📝 Commits (10+) - [`f0a2419`](https://github.com/microsoft/terminal/commit/f0a2419d76531c5dbf695b4c30723c4600f2f5dc) Add options to enable and disable read only mode - [`e9fcd4e`](https://github.com/microsoft/terminal/commit/e9fcd4e3e86bd3c1047c43a432c8b3ff69e892c2) Add missing handlers and shortcut actions - [`f1e9d94`](https://github.com/microsoft/terminal/commit/f1e9d94dbde6f89458a66e7c107b0fda5f15d9a2) Add missing elements and add missing comments - [`fa5e51b`](https://github.com/microsoft/terminal/commit/fa5e51bd3a4092907a1f81262131364803f45f72) Merge branch 'main' into dev/swinkid/readonly-actions - [`2d7ceca`](https://github.com/microsoft/terminal/commit/2d7cecafa7c8d1a4d366dd160dc8e7442908b6f9) Merge branch 'main' into dev/swinkid/readonly-actions - [`2035e7c`](https://github.com/microsoft/terminal/commit/2035e7ceb8fb854401e019e0b7605513d9cd2e90) Refactored Enable/Disable functions to Set function. Incorporated changed from PR. - [`7fa1579`](https://github.com/microsoft/terminal/commit/7fa1579e6ff7fcd431e6d9252eeaf5ec75209d80) Running Invoke-CodeFormat - [`2990281`](https://github.com/microsoft/terminal/commit/299028107f13c670bd1bf2e1c4d32b2ee79514c3) Update src/cascadia/TerminalControl/ControlCore.cpp - [`1670299`](https://github.com/microsoft/terminal/commit/1670299c7026bae09baf38ba75e1a7960255997e) Update TerminalTab.cpp - [`13445d7`](https://github.com/microsoft/terminal/commit/13445d7a6c3c69b9a1c4ecf43547f80f33eef252) Merge branch 'dev/swinkid/readonly-actions' of https://github.com/Swinkid/terminal into dev/swinkid/readonly-actions ### 📊 Changes **13 files changed** (+89 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+22 -0) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+34 -2) 📝 `src/cascadia/TerminalApp/TerminalTab.h` (+2 -0) 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+5 -0) 📝 `src/cascadia/TerminalControl/ControlCore.h` (+1 -0) 📝 `src/cascadia/TerminalControl/ControlCore.idl` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+8 -0) 📝 `src/cascadia/TerminalControl/TermControl.h` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+4 -0) 📝 `src/cascadia/TerminalSettingsModel/AllShortcutActions.h` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw` (+6 -0) 📝 `src/cascadia/TerminalSettingsModel/defaults.json` (+2 -0) </details> ### 📄 Description ## Summary of the Pull Request PR adds functionality to enable or disable readOnly mode within panes. This functionality is different to toggling as if you call the same functionality twice, it will not toggle between states. ## References and Relevant Issues - Closes https://github.com/microsoft/terminal/issues/14415 - Documentation https://github.com/MicrosoftDocs/terminal/pull/645 ## Validation Steps Performed - Checked readOnly is enabled when command triggered - Checked readOnly is enabled when command triggered while read only already enabled - Checked readOnly is disabled when command triggered while read only is enabled - Checked readOnly stays disabled when command triggered while read only is disabled - Checked above with multiple tabs and split panes ## PR Checklist - [ ] Closes #14415 - [X] Tests added/passed - [x] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: https://github.com/MicrosoftDocs/terminal/pull/645 - [X] Schema updated (if necessary) --- <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:40:10 +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#30331