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

[CLOSED] Fix #3466: Crash happened when make some operation with decimal number in the Tab Size/Spaces field. #3275

Open
core-ai-bot opened this issue Aug 29, 2021 · 4 comments

Comments

@core-ai-bot
Copy link
Member

Issue by TomMalbran
Friday Apr 19, 2013 at 05:30 GMT
Originally opened as adobe/brackets#3487


Fix for issue #3466 by not letting the unit be a float value, by making it an integer before saving it.


TomMalbran included the following code: https://github.com/adobe/brackets/pull/3487/commits

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Friday Apr 19, 2013 at 18:45 GMT


Even though this guards us against it, we should probably file a bug on CodeMirror too just to be a good citizen -- probably no client of CM would be happy with it going into an infinite loop when given a malformed tabs/spaces setting.

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Saturday Apr 20, 2013 at 07:56 GMT


Right, but the manual specifies that the indentUnit and the tabSize should be integers, so it seems more of our fault for providing a float to the option. I checked the CodeMirror code an neither of the options have a guard against bad values supplied to them. But if this seems that should be fixed in CodeMirror too, then we should add a bug there too.

@core-ai-bot
Copy link
Member Author

Comment by njx
Monday Apr 22, 2013 at 18:22 GMT


Yup, I think we want to take this fix.@RaymondLim - please merge this sprint. Thanks!

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Wednesday Apr 24, 2013 at 06:15 GMT


I can't reproduce the infinite loop with a CodeMirror demo page. The only thing I can reproduce is the word "undefined" gets inserted at the beginning of the new line as indentation. Anyway, I will try to log one for this later.

For now this Looks good and we can merge.

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

No branches or pull requests

1 participant