completion of for loop with odd colon/cursor placement

When I begin to write a for loop, I'm prompted with code completion after the first letter. Per my preferences, the first option in the completion list is highlighted ("for"). I select it by pressing the space bar.

The word "for" then appears with a space after it, followed by a colon, with the cursor positioned after the colon and a space (see attached screenshot).

The behavior I expect is that selecting the option in the code completion list will insert that option (in this case, "for") into the file with a single space after it, followed by the cursor. If a colon were placed after the cursor, that would be fine. However, to have the cursor follow the colon is annoying, because I obviously have not completed the expression.

Is this behavior a function of screwed up preferences, or is this a bug?



Environment: PyCharm 2.5.1 on OS X 10.7.3 using JDK 1.6.0_31

Screen Shot 2012-06-04 at 8.18.08 PM.png
Comment actions Permalink

I'd say that it's a bug (which only happens if you use Space, rather than Tab, to select the completion variant). Please file a YouTrack issue.


Please sign in to leave a comment.