Skip to content

Commit 8895f46

Browse files
authored
Git - better handle edge case when hard wrapping a line (microsoft#205831)
1 parent 9e92682 commit 8895f46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/git/src/diagnostics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export class GitCommitInputBoxCodeActionsProvider implements CodeActionProvider
190190
const lineLengthThreshold = line === 0 ? inputValidationSubjectLength ?? inputValidationLength : inputValidationLength;
191191

192192
const lineSegments: string[] = [];
193-
const lineText = document.lineAt(line).text;
193+
const lineText = document.lineAt(line).text.trim();
194194

195195
let position = 0;
196196
while (lineText.length - position > lineLengthThreshold) {

0 commit comments

Comments
 (0)