Rudhan
Rudhan

Reputation: 25

VS Code, F8 shows command history

I am running VS Code 1.68.1 on Windows 11.

When the terminal pane has focus and I press F8 the previously used commands are shown, just like if I press up arrow. There are no keyboard shortcuts that does this.

This becomes a problem when I press F8 in the editor pane to run a selection of PowerShell code, the code runs, but then the same command is shown after the cursor in the terminal pane.

What could cause this?

For example, I have this code selected:

Write-Output 'Hello'

This is what happens in the terminal pane:

PS C:\Temp>
PS C:\Temp> Write-Output 'Hello'
Hello
PS C:\Temp> Write-Output 'Hello'

What is causing the Write-Output command to be shown a second time?

Upvotes: 0

Views: 1792

Answers (2)

Kleber
Kleber

Reputation: 26

It looks like it is an issue with vscode powershell extension v2022.6.1, the command repeating thing stop once I reverted the extension back to v2022.5.1...

Upvotes: 1

Frank
Frank

Reputation: 1

i could fix that for me with enable the setting "Force Clear Scrollback Buffer" in the settings of powershell extension.

VSCode Setting

Upvotes: 0

Related Questions