mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix: IDEA-67827 (Smarter completion of tags)
This commit is contained in:
@@ -285,12 +285,12 @@ public class XmlTagInsertHandler implements InsertHandler<LookupElement> {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (completionChar == Lookup.AUTO_INSERT_SELECT_CHAR || completionChar == Lookup.NORMAL_SELECT_CHAR) {
|
||||
else if (completionChar == Lookup.AUTO_INSERT_SELECT_CHAR || completionChar == Lookup.NORMAL_SELECT_CHAR || completionChar == Lookup.REPLACE_SELECT_CHAR) {
|
||||
if (WebEditorOptions.getInstance().isAutomaticallyInsertClosingTag() && HtmlUtil.isSingleHtmlTag(tag.getName())) {
|
||||
template.addTextSegment(tag instanceof HtmlTag ? ">" : "/>");
|
||||
}
|
||||
else {
|
||||
if (needAlLeastOneAttribute(tag) && WebEditorOptions.getInstance().isAutomaticallyStartAttribute()) {
|
||||
if (needAlLeastOneAttribute(tag) && WebEditorOptions.getInstance().isAutomaticallyStartAttribute() && tag.getAttributes().length == 0) {
|
||||
completeAttribute(template);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user