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

10$: [VS Plugin] vs.windows.onDidChangeTextDocument activates twice on first input #236

Open
lifeinData opened this issue Apr 18, 2021 · 1 comment
Labels
for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html

Comments

@lifeinData
Copy link
Contributor

lifeinData commented Apr 18, 2021

OS: Windows 10 Enterprise 19042.928
Application: VS Code 10 v1.55.2

Any time that the parser attaches to a document and you type the first character regardless of whether or not the file is blank or has already been populated, vs.windows.onDidChangeTextDocument activates twice. We only expect it to be activated 1 time when you type the first character on a document that just had qljs attached.

@strager strager changed the title [VS Plugin] vs.windows.onDidChangeTextDocument activates twice on first input 10$: [VS Plugin] vs.windows.onDidChangeTextDocument activates twice on first input Apr 23, 2021
@strager strager added the for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html label Apr 23, 2021
strager pushed a commit that referenced this issue Apr 23, 2021
…st character input

[issue being addressed](#236)

Triggering the onDidChangeTextDocument  twice when inputting a character for the first time is a known issue. Maintainer suggests to check whether the contentChange is empty, which is what we did here.

See [scode.workspace.onDidChangeTextDocument is called with no changes](microsoft/vscode#50344)
@strager
Copy link
Collaborator

strager commented May 22, 2021

This is fixed, right? @lifeinData

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for hire Get paid for working on this task: https://quick-lint-js.com/hiring.html
Projects
None yet
2 participants