From 271f02b6947199f0b1b71f425920f1205a82ff15 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 26 Jun 2025 09:26:33 +0800 Subject: [PATCH] refactor: apply input control value from end to start For example, this will avoid applying the first parameter to $10 - $19 Signed-off-by: leo --- src/ViewModels/ExecuteCustomAction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ViewModels/ExecuteCustomAction.cs b/src/ViewModels/ExecuteCustomAction.cs index 45f5da89..f8068d63 100644 --- a/src/ViewModels/ExecuteCustomAction.cs +++ b/src/ViewModels/ExecuteCustomAction.cs @@ -127,7 +127,7 @@ namespace SourceGit.ViewModels ProgressDescription = "Run custom action ..."; var cmdline = _commandline; - for (var i = 0; i < ControlParameters.Count; i++) + for (var i = ControlParameters.Count - 1; i >= 0; i--) { var param = ControlParameters[i]; cmdline = cmdline.Replace($"${i}", param.GetValue());