Skip to content

Commit

Permalink
Force lineSpace width when in non-wrapping mode
Browse files Browse the repository at this point in the history
Closes #643
  • Loading branch information
marijnh committed Jul 18, 2012
1 parent 914441c commit b38776d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -1993,7 +1993,9 @@ var CodeMirror = (function() {
function endOperation() {
if (updateMaxLine) computeMaxLength();
if (maxLineChanged && !options.lineWrapping) {
widthForcer.style.left = stringWidth(maxLine) + "px";
var cursorWidth = widthForcer.offsetWidth, left = stringWidth(maxLine);
widthForcer.style.left = left + "px";
lineSpace.style.minWidth = (left + cursorWidth) + "px";
maxLineChanged = false;
}
var newScrollPos, updated;
Expand Down

0 comments on commit b38776d

Please sign in to comment.