From 216c5c2113c3063e18a6bd7460a403816f7b0c88 Mon Sep 17 00:00:00 2001 From: CyanSalt Date: Thu, 18 Jul 2024 21:47:29 +0800 Subject: [PATCH] fix(completion): clear completion on processing --- src/renderer/utils/shell-integration.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/renderer/utils/shell-integration.ts b/src/renderer/utils/shell-integration.ts index 18642a5f..a265c2a1 100644 --- a/src/renderer/utils/shell-integration.ts +++ b/src/renderer/utils/shell-integration.ts @@ -310,10 +310,8 @@ export class ShellIntegrationAddon implements ITerminalAddon { } }), xterm.onCursorMove(() => { - if (settings['terminal.shell.autoCompletion']) { - if (this.currentCommand && !this.currentCommand.command) { - this.triggerCompletion() - } + if (settings['terminal.shell.autoCompletion'] && this.currentCommand && !this.currentCommand.command) { + this.triggerCompletion() } else { this.clearCompletion() }