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

No closing parenthesis when starting anonymous function shorthand #1265

Closed
mtruyens opened this issue Feb 20, 2016 · 4 comments
Closed

No closing parenthesis when starting anonymous function shorthand #1265

mtruyens opened this issue Feb 20, 2016 · 4 comments
Labels
released Marks issues which have had the fixes released in a stable build
Milestone

Comments

@mtruyens
Copy link

Assume you have written
( )
and your cursor is between the two parentheses.
Now, when you try to insert an anonymous function shortcut — i.e. #( ... ) — no closing parenthesis is inserted when you have typed in the #(
As a result, at that point, you end up with an unbalanced expression:
(#()

Curiously, this bug does not show up when the outer parentheses are square brackets.

@dhruvbhatia
Copy link

I just tried to replicate this and can't. What v of IntelliJ and Cursive are you using?

cursive

@mtruyens
Copy link
Author

Thanks for the quick check! I just noticed it only happens when structural editing is OFF. (Nevertheless, it seems like a bug to me even when structural editing is off.)

@dhruvbhatia
Copy link

Thanks for clarifying, you are correct - I can reproduce this with structural editing turned off.
Makes me wonder if the default behaviour when SE = off should be to not even create a closing ) when one enters (?

Also, I found a related issue: #1101

@mtruyens
Copy link
Author

I think the closing parentheses should effectively be added. In other programming languages, where no structural editing exists, the same closing-behaviour for parentheses exists...

On 21 Feb 2016, at 10:15, Dhruv Bhatia [email protected] wrote:

Thanks for clarifying, you are correct - I can reproduce this with structural editing turned off.
Makes me wonder if the default behaviour when SE = off should be to not even create a closing ) when one enters (?

Also, I found a related issue: #1101 #1101

Reply to this email directly or view it on GitHub #1265 (comment).

@cursive-ide cursive-ide added this to the 1.4.0-eap4 milestone Nov 2, 2016
@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Marks issues which have had the fixes released in a stable build
Projects
None yet
Development

No branches or pull requests

3 participants