mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-25 14:54:39 +02:00
[BUG_FIXED] Fix tag match highlight bug.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@280 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
722416bcc4
commit
f0c3cfc77e
@ -2485,12 +2485,6 @@ TagCateg Notepad_plus::getTagCategory(XmlMatchedTagsPos & tagsPos, int curPos)
|
|||||||
|
|
||||||
bool Notepad_plus::getMatchedTagPos(int searchStart, int searchEnd, const char *tag2find, const char *oppositeTag2find, vector<int> oppositeTagFound, XmlMatchedTagsPos & tagsPos)
|
bool Notepad_plus::getMatchedTagPos(int searchStart, int searchEnd, const char *tag2find, const char *oppositeTag2find, vector<int> oppositeTagFound, XmlMatchedTagsPos & tagsPos)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
char func[256];
|
|
||||||
|
|
||||||
sprintf(func, "getMatchedTagPos(%d, %d)", searchStart, searchEnd);
|
|
||||||
writeLog("c:\\npplog", func);
|
|
||||||
*/
|
|
||||||
const bool search2Left = false;
|
const bool search2Left = false;
|
||||||
const bool search2Right = true;
|
const bool search2Right = true;
|
||||||
|
|
||||||
@ -2517,13 +2511,11 @@ bool Notepad_plus::getMatchedTagPos(int searchStart, int searchEnd, const char *
|
|||||||
|
|
||||||
if (ltTag == -1)
|
if (ltTag == -1)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if (direction == search2Left)
|
if (direction == search2Left)
|
||||||
{
|
{
|
||||||
tagsPos.tagOpenStart = foundPos.first;
|
return true;//(getTagCategory(tagsPos, ltPosOnR+2) == tagOpen);
|
||||||
tagsPos.tagOpenEnd = foundPos.second;
|
//tagsPos.tagOpenStart = foundPos.first;
|
||||||
//tagsPos.tagNameEnd = ltTag + 1 + (endPos - startPos);
|
//tagsPos.tagOpenEnd = foundPos.second;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2541,8 +2533,7 @@ bool Notepad_plus::getMatchedTagPos(int searchStart, int searchEnd, const char *
|
|||||||
{
|
{
|
||||||
if (direction == search2Left)
|
if (direction == search2Left)
|
||||||
{
|
{
|
||||||
tagsPos.tagOpenStart = foundPos.first;
|
return true;//(getTagCategory(tagsPos, ltPosOnR+2) == tagOpen);
|
||||||
tagsPos.tagOpenEnd = foundPos.second;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2556,7 +2547,15 @@ bool Notepad_plus::getMatchedTagPos(int searchStart, int searchEnd, const char *
|
|||||||
oppositeTagFound.push_back(ltTag);
|
oppositeTagFound.push_back(ltTag);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// else do nothing
|
else
|
||||||
|
{
|
||||||
|
if (direction == search2Left)
|
||||||
|
{
|
||||||
|
XmlMatchedTagsPos tmpTagsPos;
|
||||||
|
getTagCategory(tmpTagsPos, ltTag+1);
|
||||||
|
ltTag = tmpTagsPos.tagCloseEnd;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user