mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
[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)
|
if (ltPosOnR == -1)
|
||||||
return false;
|
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;
|
TagCateg tc = outOfTag;
|
||||||
if (direction == search2Left)
|
if (direction == search2Left)
|
||||||
{
|
{
|
||||||
@ -128,7 +137,6 @@ bool XmlMatchedTagsHighlighter::getMatchedTagPos(int searchStart, int searchEnd,
|
|||||||
int end = searchEnd;
|
int end = searchEnd;
|
||||||
return getMatchedTagPos(start, end, tag2find, oppositeTag2find, oppositeTagFound, tagsPos);
|
return getMatchedTagPos(start, end, tag2find, oppositeTag2find, oppositeTagFound, tagsPos);
|
||||||
}
|
}
|
||||||
//oppositeTagFound.push_back(foundPos.first);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pair<int, int> oppositeTagPos;
|
pair<int, int> oppositeTagPos;
|
||||||
@ -215,6 +223,11 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos
|
|||||||
// get word where caret is on
|
// get word where caret is on
|
||||||
int caretPos = _pEditView->execute(SCI_GETCURRENTPOS);
|
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();
|
int docLen = _pEditView->getCurrentDocLen();
|
||||||
|
|
||||||
// determinate the nature of current word : tagOpen, tagClose or outOfTag
|
// determinate the nature of current word : tagOpen, tagClose or outOfTag
|
||||||
|
Loading…
x
Reference in New Issue
Block a user