Fix: IDEA-67827 (Smarter completion of tags)

This commit is contained in:
Sergey Evdokimov
2011-04-19 15:00:17 +04:00
parent 3adde45493
commit 7246a071f5

View File

@@ -290,7 +290,8 @@ public class XmlTagInsertHandler implements InsertHandler<LookupElement> {
template.addTextSegment(tag instanceof HtmlTag ? ">" : "/>");
}
else {
if (needAlLeastOneAttribute(tag) && WebEditorOptions.getInstance().isAutomaticallyStartAttribute() && tag.getAttributes().length == 0) {
if (needAlLeastOneAttribute(tag) && WebEditorOptions.getInstance().isAutomaticallyStartAttribute() && tag.getAttributes().length == 0
&& template.getSegmentsCount() == 0) {
completeAttribute(template);
return true;
}