Skip to content

Commit 930e0a5

Browse files
committed
Add more command execution to command history
1 parent f838ac2 commit 930e0a5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/PowerShellEditorServices.Protocol/Server/LanguageServer.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,9 @@ protected Task HandleEvaluateRequest(
11001100
var executeTask =
11011101
this.editorSession.PowerShellContext.ExecuteScriptString(
11021102
evaluateParams.Expression,
1103-
true,
1104-
true);
1103+
writeInputToHost: true,
1104+
writeOutputToHost: true,
1105+
addToHistory: true);
11051106

11061107
// Return the execution result after the task completes so that the
11071108
// caller knows when command execution completed.

src/PowerShellEditorServices/Session/PowerShellContext.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,11 @@ public async Task ExecuteScriptWithArgs(string script, string arguments = null)
707707
command.AddCommand(script);
708708
}
709709

710-
await this.ExecuteCommand<object>(command, true);
710+
await this.ExecuteCommand<object>(
711+
command,
712+
null,
713+
sendOutputToHost: true,
714+
addToHistory: true);
711715
}
712716

713717
internal static TResult ExecuteScriptAndGetItem<TResult>(string scriptToExecute, Runspace runspace, TResult defaultValue = default(TResult))

0 commit comments

Comments
 (0)