Changeset 4959
- Timestamp:
- 11/01/09 14:14:07 (4 weeks ago)
- Location:
- branches/greyhound/mt-static/codemirror
- Files:
-
- 6 modified
-
htmltest.html (modified) (1 diff)
-
index.html (modified) (2 diffs)
-
js/codemirror.js (modified) (2 diffs)
-
js/editor.js (modified) (9 diffs)
-
js/undo.js (modified) (1 diff)
-
manual.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/greyhound/mt-static/codemirror/htmltest.html
r4158 r4959 46 46 path: "js/", 47 47 continuousScanning: 500, 48 lineNumbers: true, 49 textWrapping: false 48 lineNumbers: true 50 49 }); 51 50 </script> -
branches/greyhound/mt-static/codemirror/index.html
r4932 r4959 79 79 <h2>Releases</h2> 80 80 81 <p class="rel"><em>23- 09-2009</em>: <a81 <p class="rel"><em>23-10-2009</em>: <a 82 82 href="http://marijn.haverbeke.nl/codemirror/codemirror-0.64.zip">Version 83 83 0.64</a>: Solves some issues introduced by the paste-handling changes … … 158 158 release</a> or the current <a 159 159 href="http://marijn.haverbeke.nl/codemirror/codemirror-latest.zip">development 160 snapshot</a> as zip files, or use the <a 161 href="http://www.darcs.net/">darcs</a> version control system to get 162 the repository:</p> 160 snapshot</a> as zip files, or use <a 161 href="http://git-scm.com/">git</a> to get the repository:</p> 163 162 164 <pre class="code"> darcs get http://marijn.haverbeke.nl/codemirror</pre>163 <pre class="code">git clone http://marijn.haverbeke.nl/codemirror/.git</pre> 165 164 166 165 <p>This second method is recommended if you are planning to hack on 167 CodeMirror ― it makes it easy to record your patches and share them 168 with me. To see the repository online, visit the <a 169 href="http://marijn.haverbeke.nl/darcsweb.cgi?r=CodeMirror">CodeMirror 170 darcsweb</a>.</p> 166 CodeMirror ― it makes it easy to record your patches and share 167 them with me. CodeMirror can also be found on GitHub: <a 168 href="http://github.com/marijnh/CodeMirror">http://github.com/marijnh/CodeMirror</a>.</p> 171 169 172 170 <h2>Support</h2> -
branches/greyhound/mt-static/codemirror/js/codemirror.js
r4948 r4959 27 27 // their meaning. 28 28 setDefaults(CodeMirrorConfig, { 29 lang: "en", 29 30 stylesheet: "", 30 31 path: "", … … 114 115 options.stylesheet = [options.stylesheet]; 115 116 116 var html = ["<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html ><head>"];117 var html = ["<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"><html lang=\""+options.lang+"\"><head>"]; 117 118 // Hack to work around a bunch of IE8-specific problems. 118 119 html.push("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/>"); -
branches/greyhound/mt-static/codemirror/js/editor.js
r4948 r4959 446 446 container.style.whiteSpace = "nowrap"; 447 447 } 448 }448 } 449 449 450 450 function isSafeKey(code) { … … 458 458 this.history.push(null, null, asEditorLines(code)); 459 459 this.history.reset(); 460 this.contentChanged(); 460 461 }, 461 462 … … 532 533 content); 533 534 this.addDirtyNode(line); 535 this.contentChanged(); 534 536 this.scheduleHighlight(); 535 537 }, … … 563 565 } 564 566 this.addDirtyNode(line); 567 this.contentChanged(); 565 568 this.scheduleHighlight(); 566 569 }, … … 632 635 var end = this.history.nodeAfter(to.node); 633 636 this.history.push(from.node, end, lines); 637 this.contentChanged(); 634 638 return {node: this.history.nodeBefore(end), 635 639 offset: lastLine.length}; … … 779 783 keyUp: function(event) { 780 784 this.cursorActivity(isSafeKey(event.keyCode)); 781 if (event.keyCode == 13)782 this.scheduleHighlight();783 785 }, 784 786 … … 852 854 if (this.highlight(pos, endOfLine(to, this.container), true, 20) === false) 853 855 return false; 856 select.selectMarked(); 854 857 return true; 855 858 }, … … 1026 1029 this.selectionSnapshot = select.getBookmark(this.container); 1027 1030 } 1028 if (window.frameElement && window.frameElement.CodeMirror.updateNumbers) {1029 window.frameElement.CodeMirror.updateNumbers();1030 }1031 1031 1032 1032 var activity = this.options.cursorActivity; … … 1037 1037 if (activity) activity(cursor); 1038 1038 if (!safe) { 1039 this.contentChanged(); 1039 1040 this.addDirtyNode(cursor); 1040 1041 } 1042 } 1043 }, 1044 1045 contentChanged: function() { 1046 if (window.frameElement && window.frameElement.CodeMirror.updateNumbers) { 1047 window.frameElement.CodeMirror.updateNumbers(); 1041 1048 } 1042 1049 }, -
branches/greyhound/mt-static/codemirror/js/undo.js
r4948 r4959 189 189 notifyDirty: function(nodes) { 190 190 forEach(nodes, method(this.editor, "addDirtyNode")) 191 this.editor.contentChanged(); 191 192 this.editor.scheduleHighlight(); 192 193 }, -
branches/greyhound/mt-static/codemirror/manual.html
r4932 r4959 270 270 This is most easily done by giving them both the same font and 271 271 an absolute ('pt' or 'px') font size. This option defaults to 272 <code>false</code>. When enabling this, you have to disable 273 <code>textWrapping</code>, since the line numbers don't take 274 wrapped lines into account. Changeable with the 272 <code>false</code>. Changeable with the 275 273 <code>setLineNumbers(on)</code> method.</dd> 274 275 <dt><code>lineNumberDelay</code>, 276 <code>lineNumberTime</code></dt><dd>When both line numbers are 277 and text wrapping are turned on, updating line numbers can be 278 expensive. These settings can be used to control how fast the 279 updating happens ― they work in the same way as 280 <code>passDelay</code> and <code>passTime</code>.</dd> 276 281 277 282 <dt><code>indentUnit</code></dt><dd>An integer that specifies
