fix: ${files:N} will always be replaced with the first change path (#487)

* wrong loop index passed to `changes`
This commit is contained in:
leo 2024-10-14 15:31:29 +08:00
parent 5fef6e93b9
commit cc66afe5e2
No known key found for this signature in database

View file

@ -55,7 +55,7 @@ namespace SourceGit.Models
{
var count = Math.Min(int.Parse(countStr.Substring(1)), changes.Count);
for (int j = 0; j < count; j++)
paths.Add(changes[i].Path);
paths.Add(changes[j].Path);
if (count < changes.Count)
more = $" and {changes.Count - count} other files";