Skip to content

Commit 78e2454

Browse files
committed
Merge pull request #217 from PowerShell/daviwil/extension-fix
Fix return value of EditorObject.RegisterCommand
2 parents 3313968 + 1b3a8ed commit 78e2454

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/PowerShellEditorServices/Extensions/EditorObject.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ public EditorObject(
5858
/// Registers a new command in the editor.
5959
/// </summary>
6060
/// <param name="editorCommand">The EditorCommand to be registered.</param>
61-
public void RegisterCommand(EditorCommand editorCommand)
61+
/// <returns>True if the command is newly registered, false if the command already exists.</returns>
62+
public bool RegisterCommand(EditorCommand editorCommand)
6263
{
63-
this.extensionService.RegisterCommand(editorCommand);
64+
return this.extensionService.RegisterCommand(editorCommand);
6465
}
6566

6667
/// <summary>

0 commit comments

Comments
 (0)