aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/query-parser.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/query-parser.js')
-rw-r--r--ext/bg/js/query-parser.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/bg/js/query-parser.js b/ext/bg/js/query-parser.js
index ea215582..05ebfa27 100644
--- a/ext/bg/js/query-parser.js
+++ b/ext/bg/js/query-parser.js
@@ -53,7 +53,9 @@ class QueryParser extends EventDispatcher {
}
setOptions({selectedParser, termSpacing, scanning}) {
+ let selectedParserChanged = false;
if (selectedParser === null || typeof selectedParser === 'string') {
+ selectedParserChanged = (this._selectedParser !== selectedParser);
this._selectedParser = selectedParser;
}
if (typeof termSpacing === 'boolean') {
@@ -63,6 +65,9 @@ class QueryParser extends EventDispatcher {
this._textScanner.setOptions(scanning);
}
this._textScanner.setEnabled(true);
+ if (selectedParserChanged && this._parseResults.length > 0) {
+ this._renderParseResult();
+ }
}
async setText(text) {