Fixes #5308. Add editor-oriented Command enum values (Find, Replace, InsertTab, Unindent, FindNext, FindPrevious)#5309
Merged
Conversation
…indent, FindNext, FindPrevious) Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/3f2e1211-f321-47a0-b237-0e41645ca77a Co-authored-by: tig <585482+tig@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add editor-oriented Command enum values for find and replace
Fixes #3979. Add editor-oriented Command enum values (Find, Replace, InsertTab, Unindent, FindNext, FindPrevious)
May 14, 2026
tig
approved these changes
May 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds six new editor-oriented values to the Command enum (InsertTab, Unindent, Find, FindNext, FindPrevious, Replace) so editor-style views can route these actions through the KeyBindings system rather than raw key checks. A new "Search Commands" region groups the find/replace entries; indentation entries go into the existing Editing region. No view bindings are added in this PR — it is a pure enum surface extension.
Changes:
- Add
InsertTabandUnindentto the Editing Commands region inCommand.cs. - Add a new Search Commands region with
Find,FindNext,FindPrevious,Replace. - Add a new test file asserting the new enum values are defined and distinct.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Terminal.Gui/Input/Command.cs | Adds the six new enum members and the Search Commands region. |
| Tests/UnitTestsParallelizable/Input/CommandEnumTests.cs | New tests verifying the new Command values exist and are distinct. |
BDisp
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
The
Commandenum lacks values needed by text-editing views. Editor projects must handle find/replace and indentation via direct key comparison instead of theKeyBindingssystem.Proposed Changes/Todos
InsertTabandUnindentto the Editing Commands regionFind,FindNext,FindPrevious,ReplaceNew commands:
FindFindNextFindPreviousReplaceInsertTabUnindentThese are enum-only additions — no views bind to them yet. Views like
TextView,TableView, or external editors can now bind keys to these commands viaKeyBindings.Addinstead of raw key checks:Pull Request checklist:
CTRL-K-Dto automatically reformat your files before committing.dotnet testbefore commit///style comments)