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?
Please sign in to leave a comment.
Thanks so much for your help!
Hello,
Do you have the following option enabled under File | Settings | Editor | Code Style | Kotlin?
i didn't but this still puts my caret under the "(" and not aligned inside the "("
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?
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!
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.