diff --git a/lib/ace/document.js b/lib/ace/document.js index 197c7442..5610ac35 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -294,7 +294,7 @@ var Document = function(text, mode) { this.getScreenWidth = function() { this.$computeWidth(); - return this.screenWith; + return this.screenWidth; }; this.$computeWidth = function() { @@ -317,7 +317,12 @@ var Document = function(text, mode) { longestScreenLine = Math.max(longestScreenLine, len); } this.width = longestLine; - this.screenWith = longestScreenLine; + + if (this.$useWrapMode) { + this.screenWidth = this.$wrapLimit; + } else { + this.screenWidth = longestScreenLine; + } } };