oakmac / vscode-parinfer

Parinfer for VS Code
MIT License
167 stars 20 forks source link

Smart Mode bug - deleting chars not dedenting subsequent lines #37

Open shaunlebron opened 6 years ago

shaunlebron commented 6 years ago

vscode-bug-dedent

oakmac commented 6 years ago

I do not see this behavior on the master branch right now:

issue-37

Thoughts?

PEZ commented 6 years ago

For me it sometimes works, and sometimes not. I can't figure out a pattern to it, though.

PEZ commented 6 years ago

Actually, for me it happens also when adding characters. Like so:

parinf-indent-subsequent-lines

And sometimes when deleting, like so: parinf-indent-subsequent-lines2

PEZ commented 6 years ago

I'm wondering if this could be a performance issue. My Mac is pretty slow. I have a similar issue with Calva Format with its onType and onSave formatting providers. Sometimes it just doesn't happen, even though I can debug log it and see that I did ”ask” vscode to do it. Maybe vscode skips bothering with edits if it takes too long time from the event handler is triggered to the edits are computed?

oakmac commented 6 years ago

@PEZ Thank you for looking into this!

Maybe vscode skips bothering with edits if it takes too long time from the event handler is triggered to the edits are computed?

I suspect you are onto something here: a timing issue with respect to Edits / user input. Will need to investigate further.