Skip to content

Commit

Permalink
Render a wider window of lines
Browse files Browse the repository at this point in the history
This will cause small documents to be entirely in the DOM, so for them,
at least, browser search will be able to look at all the content.
  • Loading branch information
marijnh committed Nov 8, 2011
1 parent 6b5773b commit 30294ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -856,8 +856,8 @@ var CodeMirror = (function() {
// Then, determine which lines we'd want to see, and which
// updates have to be made to get there.
var visible = visibleLines();
var from = Math.min(showingFrom, Math.max(visible.from - 3, 0)),
to = Math.min(doc.size, Math.max(showingTo, visible.to + 3)),
var from = Math.min(showingFrom, Math.max(visible.from - 100, 0)),
to = Math.min(doc.size, Math.max(showingTo, visible.to + 100)),
updates = [], domPos = 0, domEnd = showingTo - showingFrom, pos = from, changedLines = 0;

for (var i = 0, l = intact.length; i < l; ++i) {
Expand Down

0 comments on commit 30294ec

Please sign in to comment.