[BUG_FIXED] Fix tags match highlighter bug.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@282 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
f35ddeb8dd
commit
d8973543ad
@ -2495,8 +2495,21 @@ bool Notepad_plus::getMatchedTagPos(int searchStart, int searchEnd, const char *
|
||||
if (ltPosOnR == -1)
|
||||
return false;
|
||||
|
||||
if ((direction == search2Left) && (getTagCategory(tagsPos, ltPosOnR+2) != tagOpen))
|
||||
TagCateg tc = outOfTag;
|
||||
if (direction == search2Left)
|
||||
{
|
||||
tc = getTagCategory(tagsPos, ltPosOnR+2);
|
||||
|
||||
if (tc != tagOpen && tc != inSingleTag)
|
||||
return false;
|
||||
if (tc == inSingleTag)
|
||||
{
|
||||
int start = foundPos.first;
|
||||
int end = searchEnd;
|
||||
return getMatchedTagPos(start, end, tag2find, oppositeTag2find, oppositeTagFound, tagsPos);
|
||||
}
|
||||
//oppositeTagFound.push_back(foundPos.first);
|
||||
}
|
||||
|
||||
pair<int, int> oppositeTagPos;
|
||||
int s = foundPos.first;
|
||||
@ -2513,16 +2526,14 @@ bool Notepad_plus::getMatchedTagPos(int searchStart, int searchEnd, const char *
|
||||
{
|
||||
if (direction == search2Left)
|
||||
{
|
||||
return true;//(getTagCategory(tagsPos, ltPosOnR+2) == tagOpen);
|
||||
//tagsPos.tagOpenStart = foundPos.first;
|
||||
//tagsPos.tagOpenEnd = foundPos.second;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
tagsPos.tagCloseStart = foundPos.first;
|
||||
tagsPos.tagCloseEnd = foundPos.second;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (isInList(ltTag, oppositeTagFound))
|
||||
{
|
||||
@ -2533,7 +2544,7 @@ bool Notepad_plus::getMatchedTagPos(int searchStart, int searchEnd, const char *
|
||||
{
|
||||
if (direction == search2Left)
|
||||
{
|
||||
return true;//(getTagCategory(tagsPos, ltPosOnR+2) == tagOpen);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -263,6 +263,7 @@
|
||||
<WordsStyle name="DOUBLESTRING" styleID="6" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="SINGLESTRING" styleID="7" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="TAG" styleID="1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="TAGEND" styleID="11" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="TAGUNKNOWN" styleID="2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="ATTRIBUTE" styleID="3" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="ATTRIBUTEUNKNOWN" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
|
Loading…
Reference in New Issue
Block a user