diff --git a/src/App.axaml.cs b/src/App.axaml.cs index db3c12a0..50a51207 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -5,7 +5,6 @@ using System.Net.Http; using System.Reflection; using System.Text; using System.Text.Json; -using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Input; @@ -45,12 +44,12 @@ namespace SourceGit [STAThread] public static void Main(string[] args) { - AppDomain.CurrentDomain.UnhandledException += (sender, e) => + AppDomain.CurrentDomain.UnhandledException += (_, e) => { LogException(e.ExceptionObject as Exception); }; - TaskScheduler.UnobservedTaskException += (sender, e) => + TaskScheduler.UnobservedTaskException += (_, e) => { LogException(e.Exception); e.SetObserved(); @@ -333,7 +332,8 @@ namespace SourceGit private static void LogException(Exception ex) { - if (ex == null) return; + if (ex == null) + return; var builder = new StringBuilder(); builder.Append($"Crash::: {ex.GetType().FullName}: {ex.Message}\n\n"); @@ -467,7 +467,7 @@ namespace SourceGit if (!File.Exists(file)) Environment.Exit(-1); - desktop.MainWindow = new Views.CodeEditor(file); + desktop.MainWindow = new Views.StandaloneCommitMessageEditor(file); return true; } diff --git a/src/Commands/CompareRevisions.cs b/src/Commands/CompareRevisions.cs index a9efb36c..860cd34a 100644 --- a/src/Commands/CompareRevisions.cs +++ b/src/Commands/CompareRevisions.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Text.RegularExpressions; namespace SourceGit.Commands @@ -18,7 +19,7 @@ namespace SourceGit.Commands public List Result() { Exec(); - _changes.Sort((l, r) => l.Path.CompareTo(r.Path)); + _changes.Sort((l, r) => string.Compare(l.Path, r.Path, StringComparison.Ordinal)); return _changes; } diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index 27f858a0..346c8f1c 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -169,6 +169,9 @@ + + + +