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

Just highlighted section formatted on save #76

Closed
garrows opened this issue Sep 5, 2014 · 3 comments
Closed

Just highlighted section formatted on save #76

garrows opened this issue Sep 5, 2014 · 3 comments
Assignees
Labels

Comments

@garrows
Copy link

garrows commented Sep 5, 2014

Hello again,

I'm on v0.6.4 and I've noticed if you have the 'beautify on save' setting on and have something highlighted when saving a file, only the highlighted code is formatted.

This is mainly annoying when commenting/uncommenting code and saving.

Again, love your work.

Thanks.

@Glavin001 Glavin001 added the bug label Sep 5, 2014
@Glavin001 Glavin001 self-assigned this Sep 5, 2014
@Glavin001
Copy link
Owner

Hi again @garrows!

Thanks for letting me know of another important bug.

The afflicting lines of code are: handleSave function and get source code depending on if selected.

A simple solution would be to add an argument to beautify that would act as a flag to ignore if a certain area is selected, if it should be forced to beautify all code in the file regardless of selection, such as in your case when saving.

I am going to the beach tonight, however once I am back I may be able to whip together a quick patch -- if no one else beats me with a Pull Request 😉 -- but no promises! I'll do my best to resolve this ASAP.

Thanks for your support! Let me know if there's anything else I can do.

@Glavin001
Copy link
Owner

I have added the option Beautify Entire File on Save, it is by default set to true. Hope that works for your needs.

@Glavin001
Copy link
Owner

Published to v0.6.5

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

No branches or pull requests

2 participants