diff options
author | Ananya Sen | 2012-07-17 14:25:53 -0700 |
---|---|---|
committer | Ananya Sen | 2012-07-17 14:25:53 -0700 |
commit | 09457e39532e9b35afb9c635266755bfcb9b488a (patch) | |
tree | 665dcbd41377b98dcab15ff995e9434d9db1a462 /imports/codemirror/lib/util/match-highlighter.js | |
parent | f2dbca782bbaca3bed96dff808693693ba083ea9 (diff) | |
parent | 4f737b24c19ddc02d20f9783b8b080fc6ef11142 (diff) | |
download | ninja-09457e39532e9b35afb9c635266755bfcb9b488a.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into copy-paste-bugfix
Diffstat (limited to 'imports/codemirror/lib/util/match-highlighter.js')
-rw-r--r-- | imports/codemirror/lib/util/match-highlighter.js | 2 |
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() { |