handle logic for line lengths with 0
This commit is contained in:
parent
e9f7583793
commit
b4877f002d
1 changed files with 3 additions and 0 deletions
|
@ -2393,6 +2393,9 @@ function Ace2Inner(){
|
||||||
var indexIntoLine = 0;
|
var indexIntoLine = 0;
|
||||||
var selectionStartInLine = 0;
|
var selectionStartInLine = 0;
|
||||||
var selectionEndInLine = rep.lines.atIndex(n).text.length; // exclude newline
|
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)
|
if (n == selStartLine)
|
||||||
{
|
{
|
||||||
selectionStartInLine = rep.selStart[1];
|
selectionStartInLine = rep.selStart[1];
|
||||||
|
|
Loading…
Reference in a new issue