Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Remove basePadding from indent-wrapping hack
Browse files Browse the repository at this point in the history
Signed-off-by: petetnt <[email protected]>
  • Loading branch information
petetnt committed Jul 31, 2016
1 parent ed9edd3 commit 966b466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1038,10 +1038,10 @@ define(function (require, exports, module) {
});
// For word wrap. Code adapted from https://codemirror.net/demo/indentwrap.html#
this._codeMirror.on("renderLine", function (cm, line, elt) {
var charWidth = self._codeMirror.defaultCharWidth(), basePadding = 4;
var charWidth = self._codeMirror.defaultCharWidth();
var off = CodeMirror.countColumn(line.text, null, cm.getOption("tabSize")) * charWidth;
elt.style.textIndent = "-" + off + "px";
elt.style.paddingLeft = (basePadding + off) + "px";
elt.style.paddingLeft = off + "px";
});
};

Expand Down

0 comments on commit 966b466

Please sign in to comment.