Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/diff
File: index.html
<!doctype html>
[0] Fix | Delete
[1] Fix | Delete
<title>CodeMirror: Diff mode</title>
[2] Fix | Delete
<meta charset="utf-8"/>
[3] Fix | Delete
<link rel=stylesheet href="../../doc/docs.css">
[4] Fix | Delete
[5] Fix | Delete
<link rel="stylesheet" href="../../lib/codemirror.css">
[6] Fix | Delete
<script src="../../lib/codemirror.js"></script>
[7] Fix | Delete
<script src="diff.js"></script>
[8] Fix | Delete
<style>
[9] Fix | Delete
.CodeMirror {border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}
[10] Fix | Delete
span.cm-meta {color: #a0b !important;}
[11] Fix | Delete
span.cm-error { background-color: black; opacity: 0.4;}
[12] Fix | Delete
span.cm-error.cm-string { background-color: red; }
[13] Fix | Delete
span.cm-error.cm-tag { background-color: #2b2; }
[14] Fix | Delete
</style>
[15] Fix | Delete
<div id=nav>
[16] Fix | Delete
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
[17] Fix | Delete
[18] Fix | Delete
<ul>
[19] Fix | Delete
<li><a href="../../index.html">Home</a>
[20] Fix | Delete
<li><a href="../../doc/manual.html">Manual</a>
[21] Fix | Delete
<li><a href="https://github.com/codemirror/codemirror">Code</a>
[22] Fix | Delete
</ul>
[23] Fix | Delete
<ul>
[24] Fix | Delete
<li><a href="../index.html">Language modes</a>
[25] Fix | Delete
<li><a class=active href="#">Diff</a>
[26] Fix | Delete
</ul>
[27] Fix | Delete
</div>
[28] Fix | Delete
[29] Fix | Delete
<article>
[30] Fix | Delete
<h2>Diff mode</h2>
[31] Fix | Delete
<form><textarea id="code" name="code">
[32] Fix | Delete
diff --git a/index.html b/index.html
[33] Fix | Delete
index c1d9156..7764744 100644
[34] Fix | Delete
--- a/index.html
[35] Fix | Delete
+++ b/index.html
[36] Fix | Delete
@@ -95,7 +95,8 @@ StringStream.prototype = {
[37] Fix | Delete
<script>
[38] Fix | Delete
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
[39] Fix | Delete
lineNumbers: true,
[40] Fix | Delete
- autoMatchBrackets: true
[41] Fix | Delete
+ autoMatchBrackets: true,
[42] Fix | Delete
+ onGutterClick: function(x){console.log(x);}
[43] Fix | Delete
});
[44] Fix | Delete
</script>
[45] Fix | Delete
</body>
[46] Fix | Delete
diff --git a/lib/codemirror.js b/lib/codemirror.js
[47] Fix | Delete
index 04646a9..9a39cc7 100644
[48] Fix | Delete
--- a/lib/codemirror.js
[49] Fix | Delete
+++ b/lib/codemirror.js
[50] Fix | Delete
@@ -399,10 +399,16 @@ var CodeMirror = (function() {
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
function onMouseDown(e) {
[54] Fix | Delete
- var start = posFromMouse(e), last = start;
[55] Fix | Delete
+ var start = posFromMouse(e), last = start, target = e.target();
[56] Fix | Delete
if (!start) return;
[57] Fix | Delete
setCursor(start.line, start.ch, false);
[58] Fix | Delete
if (e.button() != 1) return;
[59] Fix | Delete
+ if (target.parentNode == gutter) {
[60] Fix | Delete
+ if (options.onGutterClick)
[61] Fix | Delete
+ options.onGutterClick(indexOf(gutter.childNodes, target) + showingFrom);
[62] Fix | Delete
+ return;
[63] Fix | Delete
+ }
[64] Fix | Delete
+
[65] Fix | Delete
if (!focused) onFocus();
[66] Fix | Delete
[67] Fix | Delete
e.stop();
[68] Fix | Delete
@@ -808,7 +814,7 @@ var CodeMirror = (function() {
[69] Fix | Delete
for (var i = showingFrom; i < showingTo; ++i) {
[70] Fix | Delete
var marker = lines[i].gutterMarker;
[71] Fix | Delete
if (marker) html.push('<div class="' + marker.style + '">' + htmlEscape(marker.text) + '</div>');
[72] Fix | Delete
- else html.push("<div>" + (options.lineNumbers ? i + 1 : "\u00a0") + "</div>");
[73] Fix | Delete
+ else html.push("<div>" + (options.lineNumbers ? i + options.firstLineNumber : "\u00a0") + "</div>");
[74] Fix | Delete
}
[75] Fix | Delete
gutter.style.display = "none"; // TODO test whether this actually helps
[76] Fix | Delete
gutter.innerHTML = html.join("");
[77] Fix | Delete
@@ -1371,10 +1377,8 @@ var CodeMirror = (function() {
[78] Fix | Delete
if (option == "parser") setParser(value);
[79] Fix | Delete
else if (option === "lineNumbers") setLineNumbers(value);
[80] Fix | Delete
else if (option === "gutter") setGutter(value);
[81] Fix | Delete
- else if (option === "readOnly") options.readOnly = value;
[82] Fix | Delete
- else if (option === "indentUnit") {options.indentUnit = indentUnit = value; setParser(options.parser);}
[83] Fix | Delete
- else if (/^(?:enterMode|tabMode|indentWithTabs|readOnly|autoMatchBrackets|undoDepth)$/.test(option)) options[option] = value;
[84] Fix | Delete
- else throw new Error("Can't set option " + option);
[85] Fix | Delete
+ else if (option === "indentUnit") {options.indentUnit = value; setParser(options.parser);}
[86] Fix | Delete
+ else options[option] = value;
[87] Fix | Delete
},
[88] Fix | Delete
cursorCoords: cursorCoords,
[89] Fix | Delete
undo: operation(undo),
[90] Fix | Delete
@@ -1402,7 +1406,8 @@ var CodeMirror = (function() {
[91] Fix | Delete
replaceRange: operation(replaceRange),
[92] Fix | Delete
[93] Fix | Delete
operation: function(f){return operation(f)();},
[94] Fix | Delete
- refresh: function(){updateDisplay([{from: 0, to: lines.length}]);}
[95] Fix | Delete
+ refresh: function(){updateDisplay([{from: 0, to: lines.length}]);},
[96] Fix | Delete
+ getInputField: function(){return input;}
[97] Fix | Delete
};
[98] Fix | Delete
return instance;
[99] Fix | Delete
}
[100] Fix | Delete
@@ -1420,6 +1425,7 @@ var CodeMirror = (function() {
[101] Fix | Delete
readOnly: false,
[102] Fix | Delete
onChange: null,
[103] Fix | Delete
onCursorActivity: null,
[104] Fix | Delete
+ onGutterClick: null,
[105] Fix | Delete
autoMatchBrackets: false,
[106] Fix | Delete
workTime: 200,
[107] Fix | Delete
workDelay: 300,
[108] Fix | Delete
</textarea></form>
[109] Fix | Delete
<script>
[110] Fix | Delete
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
[111] Fix | Delete
</script>
[112] Fix | Delete
[113] Fix | Delete
<p><strong>MIME types defined:</strong> <code>text/x-diff</code>.</p>
[114] Fix | Delete
[115] Fix | Delete
</article>
[116] Fix | Delete
[117] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function