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

remove editor.exec indirection #3028

Closed
ianstormtaylor opened this issue Sep 22, 2019 · 1 comment
Closed

remove editor.exec indirection #3028

ianstormtaylor opened this issue Sep 22, 2019 · 1 comment

Comments

@ianstormtaylor
Copy link
Owner

Do you want to request a feature or report a bug?

Debt / improvement.

What's the current behavior?

Right now we have an editor.exec method under the covers that all of the top-level commands call into. This is currently where the dirty path normalization logic occurs, since it can be processed right after a command is run.

But #3027 can change this.

And with the withoutNormalizing hook, I think we shouldn't need it. We can instead move dirty path normalization to the end of editor.applyOperation, which seems to make more sense. And then whenever someone needs to apply a series of operations without normalizing, they should be using editor.withoutNormalizing.

This way, we can remove editor.exec and remove the extra layer of indirection that handlers currently call into. Which would mean that when stepping through code you'll jump straight through each method definition instead.

@ianstormtaylor
Copy link
Owner Author

Fixed by #3093.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant