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
+1
View File
@@ -7,6 +7,7 @@ HEAD: new items added as changes are made
Bug fixes:
* Fixed: crash in expand_keywords when given empty tags (#90)
* Fixed: tab traversal in native look editors (style and set info tabs) (#98)
* Auto replaces that match "" are now disabled
------------------------------------------------------------------------------
version 2.1.1, 2020-06-14
+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);