Skip to content

Commit

Permalink
Fix a bug caused by Exafunction#25
Browse files Browse the repository at this point in the history
  • Loading branch information
thedemons committed Dec 14, 2023
1 parent c962df1 commit c7bc168
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CodeiumVS/InlineDiff/InlineDiffView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Forms;

namespace CodeiumVs.InlineDiff;

Expand Down Expand Up @@ -483,7 +484,7 @@ private void DifferenceViewer_OnClosed(object sender, EventArgs e)
_viewer.Closed -= DifferenceViewer_OnClosed;

// restore the selected line highlight for the host view
ShowSelectedLineForView(_hostView);
_hostView?.Options.SetOptionValue(DefaultWpfViewOptions.EnableHighlightCurrentLineId, true);
}

/// <summary>
Expand Down Expand Up @@ -528,9 +529,9 @@ private void DiffView_OnViewportHeightChanged(object sender, EventArgs e)
/// <param name="view"></param>
private void ShowSelectedLineForView(IWpfTextView view)
{
LeftView.Options.SetOptionValue(DefaultWpfViewOptions.EnableHighlightCurrentLineId, (view == LeftView));
RightView.Options.SetOptionValue(DefaultWpfViewOptions.EnableHighlightCurrentLineId, (view == RightView));
_hostView.Options.SetOptionValue(DefaultWpfViewOptions.EnableHighlightCurrentLineId, (view == _hostView));
LeftView?.Options.SetOptionValue(DefaultWpfViewOptions.EnableHighlightCurrentLineId, (view == LeftView));
RightView?.Options.SetOptionValue(DefaultWpfViewOptions.EnableHighlightCurrentLineId, (view == RightView));
_hostView?.Options.SetOptionValue(DefaultWpfViewOptions.EnableHighlightCurrentLineId, (view == _hostView));
}

private void RightView_OnLostFocus(object sender, RoutedEventArgs e)
Expand Down

0 comments on commit c7bc168

Please sign in to comment.