Skip to content

Commit a77a5e2

Browse files
committed
fix: don't lint empty input box
1 parent 6ef8792 commit a77a5e2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/subjectLineCompletionItemProvider.ts

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ export class SummaryLineCompletionItemProvider implements vscode.CompletionItemP
8282
}
8383

8484
const text = document.lineAt(0).text.toLocaleLowerCase();
85+
if (!text.length) {
86+
// Don't lint, provide code actions or completions if the input box is empty
87+
return true;
88+
}
89+
8590
const prefix = text.includes(':') ? text.split(':')[0] : '';
8691
const allowedPrefixes = this._getAllowedPrefixes();
8792
return allowedPrefixes.includes(prefix) ? true : prefix;

0 commit comments

Comments
 (0)