Skip to content

Commit 81cc67e

Browse files
committed
Apply regex filter at initialization
1 parent 07bba26 commit 81cc67e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Background-Terminal/MainWindow.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ public MainWindow() {
117117

118118
_key1 = KeyInterop.KeyFromVirtualKey(_settings.Key1);
119119
_key2 = KeyInterop.KeyFromVirtualKey(_settings.Key2);
120+
121+
if (_settings.RegexFilter != null) {
122+
try {
123+
_regex = new Regex(_settings.RegexFilter);
124+
} catch {
125+
// Should not happen, unless someone fiddles with the JS file manually
126+
}
127+
}
120128

121129
Process_TextBox.Text = _settings.ProcessPath;
122130
Key1_Button.Content = _key1.ToString();

0 commit comments

Comments
 (0)