handle logic for line lengths with 0

pull/2013/head
John McLear 2013-12-01 18:06:56 +00:00
parent e9f7583793
commit b4877f002d
1 changed files with 3 additions and 0 deletions

View File

@ -2393,6 +2393,9 @@ function Ace2Inner(){
var indexIntoLine = 0;
var selectionStartInLine = 0;
var selectionEndInLine = rep.lines.atIndex(n).text.length; // exclude newline
if(rep.lines.atIndex(n).text.length == 0){
return false; // If the line length is 0 we basically treat it as having no formatting
}
if (n == selStartLine)
{
selectionStartInLine = rep.selStart[1];