From cc972c1acd8dd60a21bd1a4c01598bafd4f45e3c Mon Sep 17 00:00:00 2001 From: JC-Chung <52159296+JC-Chung@users.noreply.github.com> Date: Fri, 31 Jul 2026 11:26:19 +0800 Subject: [PATCH] fix: off-by-one in commit message subject length calculation --- src/Views/CommitMessageToolBox.axaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/CommitMessageToolBox.axaml.cs b/src/Views/CommitMessageToolBox.axaml.cs index 214f7fd8b..90128444f 100644 --- a/src/Views/CommitMessageToolBox.axaml.cs +++ b/src/Views/CommitMessageToolBox.axaml.cs @@ -243,7 +243,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang } } - if (lastLineStart < lastNonLineBreakCharIdx) + if (lastLineStart <= lastNonLineBreakCharIdx) { var validCharLen = text.Substring(lastLineStart).TrimEnd().Length; if (subjectLen > 0)