From 4c138a5518c52478631bca9507009ed8d9081895 Mon Sep 17 00:00:00 2001 From: donho Date: Mon, 23 Jun 2008 22:49:18 +0000 Subject: [PATCH] [BUG_FIXED] Fix the single tag colourising bug. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@252 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 30564680a..b6b090eaf 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2465,8 +2465,11 @@ bool Notepad_plus::getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos) } case inSingleTag : // if in single tag + { + tagsPos.tagCloseStart = -1; + tagsPos.tagCloseEnd = -1; return true; - + } default: // if outOfTag, just quit return false; @@ -2492,7 +2495,9 @@ void Notepad_plus::tagMatch() { _pEditView->execute(SCI_SETINDICATORCURRENT, SCE_UNIVERSAL_TAGMATCH); _pEditView->execute(SCI_INDICATORFILLRANGE, xmlTags.tagOpenStart, xmlTags.tagOpenEnd - xmlTags.tagOpenStart); - _pEditView->execute(SCI_INDICATORFILLRANGE, xmlTags.tagCloseStart, xmlTags.tagCloseEnd - xmlTags.tagCloseStart); + + if ((xmlTags.tagCloseStart != -1) && (xmlTags.tagCloseEnd != -1)) + _pEditView->execute(SCI_INDICATORFILLRANGE, xmlTags.tagCloseStart, xmlTags.tagCloseEnd - xmlTags.tagCloseStart); } }