Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LS] HTML template completion insert text without overriding matching range #417

Closed
mickaelistria opened this issue Oct 11, 2019 · 3 comments
Assignees

Comments

@mickaelistria
Copy link
Contributor

This is causing eclipse-wildwebdeveloper/wildwebdeveloper#279

a .ts component

@Component({
	templateUrl: './app.componentWithHtml.html'
})
export class AppComponentWithHtml {
	title = 'angular-app';
}

with a .html template

<h1>{{t}}</h1>

Asking completion after t in the template sends

{"jsonrpc":"2.0","id":"2","result":[{"label":"title","kind":10,"detail":"property","sortText":"title","textEdit":{"range":{"start":{"line":0,"character":7},"end":{"line":0,"character":7}},"newText":"title"}}]}

which, consistently with the spec, results in

<h1>{{ttitle}}</h1>

(with 2 ts).

The message is incorrect: either the newText should only be itle or the range should be {"start":{"line":0,"character":6},"end":{"line":0,"character":7}} to override the existing t

@kyliau
Copy link
Contributor

kyliau commented Oct 11, 2019

This is a known issue, and @ayazhafiz is working on it.
WIP PR: angular/angular#33091

@kyliau
Copy link
Contributor

kyliau commented Nov 11, 2019

Closing this, since angular/angular#33091 is done.

@kyliau kyliau closed this as completed Nov 11, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants