From d2133731d218b5b3d6a50ddaf0b29fd125b2343a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 14 May 2026 20:10:07 +0000 Subject: [PATCH 1/2] Initial plan From 286986d6a33d99d0801823fa4b6b7b128c44de23 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 14 May 2026 20:13:55 +0000 Subject: [PATCH 2/2] Add editor-oriented Command enum values (Find, Replace, InsertTab, Unindent, 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> --- Terminal.Gui/Input/Command.cs | 22 +++++++++++ .../Input/CommandEnumTests.cs | 38 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 Tests/UnitTestsParallelizable/Input/CommandEnumTests.cs diff --git a/Terminal.Gui/Input/Command.cs b/Terminal.Gui/Input/Command.cs index 8fd51dafc9..2c477abe08 100644 --- a/Terminal.Gui/Input/Command.cs +++ b/Terminal.Gui/Input/Command.cs @@ -214,6 +214,28 @@ public enum Command /// Unix emulation. UnixEmulation, + /// Inserts a tab character or spaces at the cursor or selection. + InsertTab, + + /// Removes one level of indentation from the current line or selection. + Unindent, + + #endregion + + #region Search Commands + + /// Opens or activates a find/search UI. + Find, + + /// Finds the next match. + FindNext, + + /// Finds the previous match. + FindPrevious, + + /// Opens or activates a find-and-replace UI. + Replace, + #endregion #region Tree Commands diff --git a/Tests/UnitTestsParallelizable/Input/CommandEnumTests.cs b/Tests/UnitTestsParallelizable/Input/CommandEnumTests.cs new file mode 100644 index 0000000000..2f050cab34 --- /dev/null +++ b/Tests/UnitTestsParallelizable/Input/CommandEnumTests.cs @@ -0,0 +1,38 @@ +// Copilot + +using Terminal.Gui.Input; + +namespace UnitTestsParallelizable.Input; + +public class CommandEnumTests +{ + [Fact] + public void EditorCommands_AreDefined () + { + // Verify the editor-oriented Command enum values exist and are distinct + Command [] editorCommands = + [ + Command.Find, + Command.FindNext, + Command.FindPrevious, + Command.Replace, + Command.InsertTab, + Command.Unindent + ]; + + // All values should be distinct + Assert.Equal (editorCommands.Length, editorCommands.Distinct ().Count ()); + } + + [Theory] + [InlineData (Command.Find)] + [InlineData (Command.FindNext)] + [InlineData (Command.FindPrevious)] + [InlineData (Command.Replace)] + [InlineData (Command.InsertTab)] + [InlineData (Command.Unindent)] + public void EditorCommand_IsDefined (Command command) + { + Assert.True (Enum.IsDefined (command)); + } +}