Fix auto-insert for xml comment incorrect insertion (closes #598, fixes
Skip auto-insertion detection for xml comment tag.pull/958/merge
parent
be057973bc
commit
dd31ea2e66
|
@ -382,12 +382,15 @@ void AutoCompletion::getCloseTag(char *closeTag, size_t closeTagSize, size_t car
|
|||
if (size_t(foundTextLen) > closeTagSize - 2) // buffer size is not large enough. -2 for '/' & '\0'
|
||||
return;
|
||||
|
||||
char tagHead[3];
|
||||
_pEditView->getText(tagHead, targetStart, targetStart+2);
|
||||
char tagHead[5];
|
||||
_pEditView->getText(tagHead, targetStart, targetStart+4);
|
||||
|
||||
if (tagHead[1] == '/') // "</toto>" will be ignored
|
||||
return;
|
||||
|
||||
if (strncmp(tagHead, "<!--", 4) == 0) // Comments will be ignored
|
||||
return;
|
||||
|
||||
char tagTail[2];
|
||||
_pEditView->getText(tagTail, caretPos-2, caretPos-1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue