Skip to content

Commit

Permalink
fix(language-service): handle text edit of special closing tags compl…
Browse files Browse the repository at this point in the history
…etion correctly (#5016)
  • Loading branch information
KazariEX authored Dec 5, 2024
1 parent 21fa760 commit 4d1e2d6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/language-service/lib/plugins/vue-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,14 +778,16 @@ export function create(
if (resolvedLabelKey) {
const name = resolvedLabelKey.tag;
item.label = resolvedLabelKey.leadingSlash ? '/' + name : name;

const text = resolvedLabelKey.leadingSlash ? `/${name}>` : name;
if (item.textEdit) {
item.textEdit.newText = name;
item.textEdit.newText = text;
};
if (item.insertText) {
item.insertText = name;
item.insertText = text;
}
if (item.sortText) {
item.sortText = name;
item.sortText = text;
}
}

Expand Down

0 comments on commit 4d1e2d6

Please sign in to comment.