Disable auto replaces that match an empty string.

Some people are having problems with these suddenly showing up and making typing impossible. This doesn't fix the cause of the ARs appearing, but it at least prevents it from making MSE unusable.
This commit is contained in:
Twan van Laarhoven
2020-09-27 15:02:56 +02:00
parent cf19bc76c3
commit a9077cd265
3 changed files with 9 additions and 0 deletions
+6
View File
@@ -49,3 +49,9 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(AutoReplace) {
REFLECT(match);
REFLECT(replace);
}
void after_reading(AutoReplace& ar, Version) {
if (ar.match.empty()) {
ar.enabled = false;
}
}
+2
View File
@@ -58,3 +58,5 @@ public:
DECLARE_REFLECTION();
};
void after_reading(AutoReplace& ar, Version);