Caret position in kotlin code

Answered

Whenever i am using kotlin, i have my format settings to align multi-line arguments with the parenthesis.  However, when i type ",<enter>", it always moves me to the beginning of the next line:

This behavior can be avoided if the ")" is on a different line.  Is there an obvious setting i am missing or is this a bug?

0
6 comments

Thanks so much for your help!

1

Hello,

Do you have the following option enabled under File | Settings | Editor | Code Style | Kotlin?

0

i didn't but this still puts my caret under the "(" and not aligned inside the "("

 

foo(arg1,
arg2,
arg3)

0

Sorry, it's a bit unclear. Can you take two screenshots of a function after you hit Enter: one with where you expect your caret to end up, and one with what you actually get?

0

Current behavior:

Desired behavior:

Behavior without the trailing ")":

This only seems to happen in kotlin not java and as best i can tell it is set up the same way.  Also, when i say "format code" it goes back to the right place.  Thanks for your help!

0

Thanks for the details.

I was able to reproduce the problem, and created a new bug report for it: KT-42030.

Feel free to subscribe to it for updates and leave additional comments.

0

Please sign in to leave a comment.