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

Commit 61e2905

Browse files
committed
Fix highlighting on load
1 parent 263b686 commit 61e2905

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

UI/Components/EditorElement.xaml.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ public EditorElement(string filePath)
9191

9292
editor.PreviewMouseWheel += PrevMouseWheel;
9393
editor.MouseDown += editor_MouseDown;
94+
editor.Loaded += editor_Loaded;
95+
9496
editor.TextArea.TextEntered += TextArea_TextEntered;
9597
editor.TextArea.TextEntering += TextArea_TextEntering;
9698
var fInfo = new FileInfo(filePath);
@@ -137,7 +139,6 @@ public EditorElement(string filePath)
137139

138140
colorizeSelection = new ColorizeSelection();
139141
editor.TextArea.TextView.LineTransformers.Add(colorizeSelection);
140-
ParseIncludes(null, null);
141142

142143
LoadAutoCompletes();
143144

@@ -174,6 +175,11 @@ public EditorElement(string filePath)
174175
CompileBox.IsChecked = filePath.EndsWith(".sp");
175176
}
176177

178+
private void editor_Loaded(object sender, RoutedEventArgs e)
179+
{
180+
ParseIncludes(sender, e);
181+
}
182+
177183
public string FullFilePath
178184
{
179185
get => _FullFilePath;

0 commit comments

Comments
 (0)