Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Terminal.Gui/Input/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,28 @@ public enum Command
/// <summary>Unix emulation.</summary>
UnixEmulation,

/// <summary>Inserts a tab character or spaces at the cursor or selection.</summary>
InsertTab,

/// <summary>Removes one level of indentation from the current line or selection.</summary>
Unindent,

#endregion

#region Search Commands

/// <summary>Opens or activates a find/search UI.</summary>
Find,

/// <summary>Finds the next match.</summary>
FindNext,

/// <summary>Finds the previous match.</summary>
FindPrevious,

/// <summary>Opens or activates a find-and-replace UI.</summary>
Replace,

#endregion

#region Tree Commands
Expand Down
38 changes: 38 additions & 0 deletions Tests/UnitTestsParallelizable/Input/CommandEnumTests.cs
Original file line number Diff line number Diff line change
@@ -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));
}
}
Loading