OLD | NEW |
| 1 // CodeMirror, copyright (c) by Marijn Haverbeke and others |
| 2 // Distributed under an MIT license: http://codemirror.net/LICENSE |
| 3 |
1 // Because sometimes you need to mark the selected *text*. | 4 // Because sometimes you need to mark the selected *text*. |
2 // | 5 // |
3 // Adds an option 'styleSelectedText' which, when enabled, gives | 6 // Adds an option 'styleSelectedText' which, when enabled, gives |
4 // selected text the CSS class given as option value, or | 7 // selected text the CSS class given as option value, or |
5 // "CodeMirror-selectedtext" when the value is not a string. | 8 // "CodeMirror-selectedtext" when the value is not a string. |
6 | 9 |
7 (function(mod) { | 10 (function(mod) { |
8 if (typeof exports == "object" && typeof module == "object") // CommonJS | 11 if (typeof exports == "object" && typeof module == "object") // CommonJS |
9 mod(require("../../lib/codemirror")); | 12 mod(require("../../lib/codemirror")); |
10 else if (typeof define == "function" && define.amd) // AMD | 13 else if (typeof define == "function" && define.amd) // AMD |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 if (cmp(to, coverEnd.to) > 0) { | 109 if (cmp(to, coverEnd.to) > 0) { |
107 if (to.line - coverEnd.from.line < CHUNK_SIZE) { | 110 if (to.line - coverEnd.from.line < CHUNK_SIZE) { |
108 array.pop().clear(); | 111 array.pop().clear(); |
109 coverRange(cm, coverEnd.from, to); | 112 coverRange(cm, coverEnd.from, to); |
110 } else { | 113 } else { |
111 coverRange(cm, coverEnd.to, to); | 114 coverRange(cm, coverEnd.to, to); |
112 } | 115 } |
113 } | 116 } |
114 } | 117 } |
115 }); | 118 }); |
OLD | NEW |