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

Commit

Permalink
Fix highlighting on load
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexer10 committed Oct 27, 2020
1 parent 263b686 commit 61e2905
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion UI/Components/EditorElement.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public EditorElement(string filePath)

editor.PreviewMouseWheel += PrevMouseWheel;
editor.MouseDown += editor_MouseDown;
editor.Loaded += editor_Loaded;

editor.TextArea.TextEntered += TextArea_TextEntered;
editor.TextArea.TextEntering += TextArea_TextEntering;
var fInfo = new FileInfo(filePath);
Expand Down Expand Up @@ -137,7 +139,6 @@ public EditorElement(string filePath)

colorizeSelection = new ColorizeSelection();
editor.TextArea.TextView.LineTransformers.Add(colorizeSelection);
ParseIncludes(null, null);

LoadAutoCompletes();

Expand Down Expand Up @@ -174,6 +175,11 @@ public EditorElement(string filePath)
CompileBox.IsChecked = filePath.EndsWith(".sp");
}

private void editor_Loaded(object sender, RoutedEventArgs e)
{
ParseIncludes(sender, e);
}

public string FullFilePath
{
get => _FullFilePath;
Expand Down

0 comments on commit 61e2905

Please sign in to comment.