From a3ff06a9e308924059951dc48b9532443fd66841 Mon Sep 17 00:00:00 2001 From: Julian Viereck Date: Sun, 9 Jan 2011 01:40:43 +0100 Subject: [PATCH] In wrapMode, document.screenWidth = doc.. Fix typo --- lib/ace/document.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; + } } };