[BUG_FIXED] Fix tags match highlighter bug - the none-html zone won't be highlight.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@286 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
c9e76e0193
commit
096f030843
|
@ -115,6 +115,15 @@ bool XmlMatchedTagsHighlighter::getMatchedTagPos(int searchStart, int searchEnd,
|
|||
if (ltPosOnR == -1)
|
||||
return false;
|
||||
|
||||
// if the tag is found in non html zone, we skip it
|
||||
int idStyle = _pEditView->execute(SCI_GETSTYLEAT, ltPosOnR);
|
||||
if (idStyle >= SCE_HJ_START)
|
||||
{
|
||||
int start = foundPos.first;
|
||||
int end = searchEnd;
|
||||
return getMatchedTagPos(start, end, tag2find, oppositeTag2find, oppositeTagFound, tagsPos);
|
||||
}
|
||||
|
||||
TagCateg tc = outOfTag;
|
||||
if (direction == search2Left)
|
||||
{
|
||||
|
@ -128,7 +137,6 @@ bool XmlMatchedTagsHighlighter::getMatchedTagPos(int searchStart, int searchEnd,
|
|||
int end = searchEnd;
|
||||
return getMatchedTagPos(start, end, tag2find, oppositeTag2find, oppositeTagFound, tagsPos);
|
||||
}
|
||||
//oppositeTagFound.push_back(foundPos.first);
|
||||
}
|
||||
|
||||
pair<int, int> oppositeTagPos;
|
||||
|
@ -214,6 +222,11 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos
|
|||
{
|
||||
// get word where caret is on
|
||||
int caretPos = _pEditView->execute(SCI_GETCURRENTPOS);
|
||||
|
||||
// if the tag is found in non html zone, then quit
|
||||
int idStyle = _pEditView->execute(SCI_GETSTYLEAT, caretPos);
|
||||
if (idStyle >= SCE_HJ_START)
|
||||
return false;
|
||||
|
||||
int docLen = _pEditView->getCurrentDocLen();
|
||||
|
||||
|
|
Loading…
Reference in New Issue