From 7d91c21b87e4cfa1f59bc3a4b4ed509a0d23c7af Mon Sep 17 00:00:00 2001 From: goran-w Date: Tue, 5 Nov 2024 16:55:03 +0100 Subject: [PATCH] Corrected misspelled local variable nextHigh(t)light --- src/ViewModels/DiffContext.cs | 10 ++++++++++ src/Views/TextDiffView.axaml.cs | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/ViewModels/DiffContext.cs b/src/ViewModels/DiffContext.cs index 87b1a6de..e9bb703d 100644 --- a/src/ViewModels/DiffContext.cs +++ b/src/ViewModels/DiffContext.cs @@ -73,6 +73,16 @@ namespace SourceGit.ViewModels LoadDiffContent(); } + public void PrevChange() + { + // To be implemented... + } + + public void NextChange() + { + // To be implemented... + } + public void ToggleFullTextDiff() { Preference.Instance.UseFullTextDiff = !Preference.Instance.UseFullTextDiff; diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs index da2d9ed1..76a1e65a 100644 --- a/src/Views/TextDiffView.axaml.cs +++ b/src/Views/TextDiffView.axaml.cs @@ -279,7 +279,7 @@ namespace SourceGit.Views var highlightBG = info.Type == Models.TextDiffLineType.Added ? _presenter.AddedHighlightBrush : _presenter.DeletedHighlightBrush; var processingIdxStart = 0; var processingIdxEnd = 0; - var nextHightlight = 0; + var nextHighlight = 0; foreach (var tl in line.TextLines) { @@ -288,9 +288,9 @@ namespace SourceGit.Views var y = line.GetTextLineVisualYPosition(tl, VisualYPosition.LineTop) - textView.VerticalOffset; var h = line.GetTextLineVisualYPosition(tl, VisualYPosition.LineBottom) - textView.VerticalOffset - y; - while (nextHightlight < info.Highlights.Count) + while (nextHighlight < info.Highlights.Count) { - var highlight = info.Highlights[nextHightlight]; + var highlight = info.Highlights[nextHighlight]; if (highlight.Start >= processingIdxEnd) break; @@ -305,7 +305,7 @@ namespace SourceGit.Views if (highlight.End >= processingIdxEnd) break; - nextHightlight++; + nextHighlight++; } processingIdxStart = processingIdxEnd;