mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
Don't add empty commands to command history
This commit is contained in:
parent
4733f74a95
commit
57d5e79b88
|
@ -418,7 +418,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||
});
|
||||
} else if (e === TerminalCapability.CommandDetection) {
|
||||
this.capabilities.get(TerminalCapability.CommandDetection)?.onCommandFinished(e => {
|
||||
this._instantiationService.invokeFunction(getCommandHistory, this.shellType)?.add(e.command);
|
||||
if (e.command.trim().length > 0) {
|
||||
this._instantiationService.invokeFunction(getCommandHistory, this.shellType)?.add(e.command);
|
||||
}
|
||||
});
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue