Commit 2a02978c authored by Ilya Kirillov's avatar Ilya Kirillov

Now the cursor stops on leaving/entering inline classes inside a paragraph content.

parent 122e1e5c
...@@ -1720,19 +1720,27 @@ CParagraphContentWithParagraphLikeContent.prototype.Get_LeftPos = function(Searc ...@@ -1720,19 +1720,27 @@ CParagraphContentWithParagraphLikeContent.prototype.Get_LeftPos = function(Searc
var CurPos = ( true === UseContentPos ? ContentPos.Get(Depth) : this.Content.length - 1 ); var CurPos = ( true === UseContentPos ? ContentPos.Get(Depth) : this.Content.length - 1 );
this.Content[CurPos].Get_LeftPos(SearchPos, ContentPos, Depth + 1, UseContentPos); this.Content[CurPos].Get_LeftPos(SearchPos, ContentPos, Depth + 1, UseContentPos);
SearchPos.Pos.Update( CurPos, Depth ); SearchPos.Pos.Update(CurPos, Depth);
if ( true === SearchPos.Found ) if (true === SearchPos.Found)
return true; return true;
CurPos--; CurPos--;
while ( CurPos >= 0 ) if (CurPos >= 0 && this.Content[CurPos + 1].IsStopCursorOnEntryExit())
{
this.Content[CurPos].Get_EndPos(false, SearchPos.Pos, Depth + 1);
SearchPos.Pos.Update(CurPos, Depth);
SearchPos.Found = true;
return true;
}
while (CurPos >= 0)
{ {
this.Content[CurPos].Get_LeftPos(SearchPos, ContentPos, Depth + 1, false); this.Content[CurPos].Get_LeftPos(SearchPos, ContentPos, Depth + 1, false);
SearchPos.Pos.Update( CurPos, Depth ); SearchPos.Pos.Update(CurPos, Depth);
if ( true === SearchPos.Found ) if (true === SearchPos.Found)
return true; return true;
CurPos--; CurPos--;
...@@ -1748,20 +1756,28 @@ CParagraphContentWithParagraphLikeContent.prototype.Get_RightPos = function(Sear ...@@ -1748,20 +1756,28 @@ CParagraphContentWithParagraphLikeContent.prototype.Get_RightPos = function(Sear
var CurPos = ( true === UseContentPos ? ContentPos.Get(Depth) : 0 ); var CurPos = ( true === UseContentPos ? ContentPos.Get(Depth) : 0 );
this.Content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, UseContentPos, StepEnd); this.Content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, UseContentPos, StepEnd);
SearchPos.Pos.Update( CurPos, Depth ); SearchPos.Pos.Update(CurPos, Depth);
if ( true === SearchPos.Found ) if (true === SearchPos.Found)
return true; return true;
CurPos++; CurPos++;
var Count = this.Content.length; var Count = this.Content.length;
while ( CurPos < this.Content.length ) if (CurPos < Count && this.Content[CurPos - 1].IsStopCursorOnEntryExit())
{
this.Content[CurPos].Get_StartPos(SearchPos.Pos, Depth + 1);
SearchPos.Pos.Update(CurPos, Depth);
SearchPos.Found = true;
return true;
}
while (CurPos < this.Content.length)
{ {
this.Content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, false, StepEnd); this.Content[CurPos].Get_RightPos(SearchPos, ContentPos, Depth + 1, false, StepEnd);
SearchPos.Pos.Update( CurPos, Depth ); SearchPos.Pos.Update(CurPos, Depth);
if ( true === SearchPos.Found ) if (true === SearchPos.Found)
return true; return true;
CurPos++; CurPos++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment