From 29ad232ac6f5b801e97dbe6fdc78a5b7c644d90f Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Fri, 7 Jun 2024 17:40:50 -0700 Subject: [PATCH] Don't show ghost text if curLine is empty (#674) --- src/models/autocomplete.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/models/autocomplete.ts b/src/models/autocomplete.ts index d71e370b7..c4d6f3e11 100644 --- a/src/models/autocomplete.ts +++ b/src/models/autocomplete.ts @@ -187,9 +187,7 @@ export class AutocompleteModel { * @see getPrimarySuggestionIndex */ getPrimarySuggestionCompletion(): string { - if (!this.isEnabled) { - return null; - } + if (!this.isEnabled || !this.globalModel.inputModel.curLine) return null; const suggestionIndex = this.getPrimarySuggestionIndex(); const retVal = this.getSuggestionCompletion(suggestionIndex); if (retVal) {