From 10c6dc0174790eb8ecdd00b33ce928da3ce90bf6 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Thu, 15 Sep 2016 09:22:02 -0400 Subject: [PATCH] Skip auto-complete of tags within HTML script Closes #2282 Closes #2284 --- PowerEditor/src/ScitillaComponent/AutoCompletion.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp b/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp index 48ba41c5..e305279f 100644 --- a/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp +++ b/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp @@ -370,6 +370,14 @@ bool AutoCompletion::showFunctionComplete() void AutoCompletion::getCloseTag(char *closeTag, size_t closeTagSize, size_t caretPos, bool isHTML) { + if (isHTML) + { + // Skip if caretPos is within any scripting language + int style = static_cast(_pEditView->execute(SCI_GETSTYLEAT, caretPos)); + if (style >= SCE_HJ_START) + return; + } + char prev = static_cast(_pEditView->execute(SCI_GETCHARAT, caretPos - 2)); char prevprev = static_cast(_pEditView->execute(SCI_GETCHARAT, caretPos - 3));