aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/lib/util/match-highlighter.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-17 11:29:09 -0700
committerValerio Virgillito2012-07-17 11:29:09 -0700
commit58e86247524cc2d545bd6884f1b5c9fdba3b9164 (patch)
tree53305d354fce502ee39378babf47ace6c91ce2fd /imports/codemirror/lib/util/match-highlighter.js
parent0f0cffd4df85e7adf5081fe66c768c70b2ead9b3 (diff)
parent4f737b24c19ddc02d20f9783b8b080fc6ef11142 (diff)
downloadninja-58e86247524cc2d545bd6884f1b5c9fdba3b9164.tar.gz
Merge branch 'refs/heads/master' into v0.7.1
Diffstat (limited to 'imports/codemirror/lib/util/match-highlighter.js')
-rw-r--r--imports/codemirror/lib/util/match-highlighter.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/imports/codemirror/lib/util/match-highlighter.js b/imports/codemirror/lib/util/match-highlighter.js
index b70cc4cf..59098ff8 100644
--- a/imports/codemirror/lib/util/match-highlighter.js
+++ b/imports/codemirror/lib/util/match-highlighter.js
@@ -23,7 +23,7 @@
23 function markDocument(cm, className, minChars) { 23 function markDocument(cm, className, minChars) {
24 clearMarks(cm); 24 clearMarks(cm);
25 minChars = (typeof minChars !== 'undefined' ? minChars : DEFAULT_MIN_CHARS); 25 minChars = (typeof minChars !== 'undefined' ? minChars : DEFAULT_MIN_CHARS);
26 if (cm.somethingSelected() && cm.getSelection().length >= minChars) { 26 if (cm.somethingSelected() && cm.getSelection().replace(/^\s+|\s+$/g, "").length >= minChars) {
27 var state = getMatchHighlightState(cm); 27 var state = getMatchHighlightState(cm);
28 var query = cm.getSelection(); 28 var query = cm.getSelection();
29 cm.operation(function() { 29 cm.operation(function() {