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 some indent problems #248

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

[CLOSED] Fix some indent problems #248

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

Comments

@core-ai-bot
Copy link
Member

Issue by gruehle
Monday Feb 13, 2012 at 19:58 GMT
Originally opened as adobe/brackets#250


@njx

  • Pressing the TAB key on an empty line no longer inserts an additional tab.
  • Fixed problem that occasionally added an additional space character when typing a tab.
  • Disable built-in "electric chars" feature and replace with a less heavy-handed version. The new version does the following:
    • Only runs when closing braces are typed: "]", "}", or ")"
    • Only runs if the line is all whitespace (except the closing brace)
      This should eliminate the majority of the odd and unpredictable auto-indent behaviors.

This fixes issues #155 and #193.


gruehle included the following code: https://github.com/adobe/brackets/pull/250/commits

@core-ai-bot
Copy link
Member Author

Comment by njx
Tuesday Feb 14, 2012 at 00:12 GMT


Done with first review.

@core-ai-bot
Copy link
Member Author

Comment by njx
Tuesday Feb 14, 2012 at 02:13 GMT


Just tested this and it isn't working for me. If I'm in a blank JS file and I type:

function foo() {
    blah();

then hit Return after blah(); and type the close-brace, it indents it to the right instead of pulling it back over to the left.

@core-ai-bot
Copy link
Member Author

Comment by njx
Tuesday Feb 14, 2012 at 02:15 GMT


It looks like the problem is the "smart" argument--if I remove it, it does the right thing. So it must not be the case that passing "smart" is the same as passing nothing.

@core-ai-bot
Copy link
Member Author

Comment by gruehle
Tuesday Feb 14, 2012 at 17:39 GMT


Passing 'smart' wasn't so smart after all... removed.

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