Git - better handle edge case when hard wrapping a line (#205831)

This commit is contained in:
Ladislau Szomoru 2024-02-21 10:26:15 +01:00 committed by GitHub
parent 9e92682062
commit 8895f460c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -190,7 +190,7 @@ export class GitCommitInputBoxCodeActionsProvider implements CodeActionProvider
const lineLengthThreshold = line === 0 ? inputValidationSubjectLength ?? inputValidationLength : inputValidationLength;
const lineSegments: string[] = [];
const lineText = document.lineAt(line).text;
const lineText = document.lineAt(line).text.trim();
let position = 0;
while (lineText.length - position > lineLengthThreshold) {