Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit e8cfcfd

Browse files
committed
improved colors of highighted repetitions of selected word
1 parent f7a28fa commit e8cfcfd

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

UI/Components/EditorElement/EditorElement.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ private void RegularyTimer_Elapsed(object sender, ElapsedEventArgs e)
332332
if (WantFoldingUpdate)
333333
{
334334
WantFoldingUpdate = false;
335-
try //this "solves" a racing-conditions error - i wasnt able to fix it till today..
335+
try
336336
{
337-
Dispatcher.Invoke(() => { foldingStrategy.UpdateFoldings(foldingManager, editor.Document); });
337+
Dispatcher.Invoke(() => foldingStrategy.UpdateFoldings(foldingManager, editor.Document));
338338
}
339339
catch (Exception)
340340
{

UI/Components/EditorElement/Highlighting/ColorizeSection.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ protected override void ColorizeLine(DocumentLine line)
2828
ChangeLinePart(
2929
lineStartOffset + index,
3030
lineStartOffset + index + SelectionString.Length,
31-
element => { element.BackgroundBrush = Brushes.LightGray; });
31+
element => {
32+
element.BackgroundBrush = new SolidColorBrush(Colors.CornflowerBlue);
33+
element.TextRunProperties.SetForegroundBrush(new SolidColorBrush(Colors.White));
34+
});
3235
start = index + 1;
3336
}
3437
}

UI/Windows/SearchWindow.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,9 @@ private List<EditorElement> GetEditorElementsForFraction(out int editorIndex)
466466
var editorStartIndex = 0;
467467
List<EditorElement> editors;
468468
if (FindDestinies.SelectedIndex == 0)
469-
{ editors = new() { _editor }; }
469+
{
470+
editors = new() { _editor };
471+
}
470472
else
471473
{
472474
editors = _allEditors;

0 commit comments

Comments
 (0)