Skip to content

Commit

Permalink
#137: CodeMirror tail text locks must deny appending to end of file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajvincent committed Dec 1, 2017
1 parent 76b4326 commit fafd05f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/gui/utilities/CodeMirrorManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ const CodeMirrorManager = window.CodeMirrorManager = {
getTextLock: function(editor, startLine, endLine)
{
const doc = editor.getDoc();
const options = Object.freeze({ readOnly: true, className: "readOnly" });
const options = { readOnly: true, className: "readOnly" };
if (startLine === 0)
options.inclusiveLeft = true;
if (endLine === Infinity)
options.inclusiveRight = true;
Object.freeze(options);
let mark = doc.markText(
{line: startLine, ch: 0},
{line: endLine, ch: 0},
Expand Down

0 comments on commit fafd05f

Please sign in to comment.