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

Odd indentation in PHP upon hitting Enter at certain times #1427

Closed
lagbox opened this Issue May 8, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@lagbox
Contributor

lagbox commented May 8, 2016

Short Summary

Sometimes upon hitting enter inside a function call you end up in the same column on the next line.

Steps to Reproduce

Paste what is in the example below, place cursor between the brackets, hit enter.

return view('blah', []);

You will end up with the actual result listed below.

Expected results

return view('blah', [
    ^
])

Actual results

return view('blah', [
                    ^])

Platform Information

Komodo Edit or IDE? IDE
Komodo Version? 10.0.0-beta1, build 89113
Operating System (and version)? Ubuntu 15.10

Additional Information

I can see that in normal flow, the characters to the right, brackets or parentheses, are underlined. When they aren't underlined this issue will happen.

screenshot from 2016-05-08 02-06-07

These examples are specific to using brackets. If there are no brackets open hitting enter will align the closing parenthesis with the opening one.

@Naatan Naatan added this to the 10.1 milestone May 8, 2016

@Naatan

This comment has been minimized.

Member

Naatan commented May 8, 2016

This is by design, some people (the person that implemented this) like this coding style, personally it annoys me endlessly as well.

So lets add a pref that controls this.

@lagbox

This comment has been minimized.

Contributor

lagbox commented May 8, 2016

Yea its kinda odd that it has the expected result, unless you follow one of those methods, then you get a different result.

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented May 9, 2016

I didn't write it but I prefer it. Isn't this already a pref?

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented May 9, 2016

Isn't this already a pref?

I guess not. Never mind.

@lagbox

This comment has been minimized.

Contributor

lagbox commented Sep 26, 2016

I still get this from time to time. Sometimes it doesn't provide the other bracket.

It feels like some race condition because its not constant.

return view('blah', [
                    ^)

Komodo IDE, version 10.1.1, build 89474, platform linux-x86_64.
Built on Thu Sep 1 14:52:01 2016.

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 27, 2016

@mitchell-as could this be related to onUIupdate?

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Sep 27, 2016

Yes, if you type faster than 50ms, then you might not have the closing soft brace inserted. Recent changes to remove the timeout would prevent this from happening at all.

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