Scala Editor decides to stop accepting parenthesis
Migrated from http://lampsvn.epfl.ch/trac/scala/ticket/560
Reporter dragos
I think you'd market this as a feature, but it is extremely counter-intuitive: one cannot insert closing parens that have not been open! Moreover, closing an 'extra' parenthesis will just eat the last seen closing parenthesis, and and move it to the cursor. That's really not what you want (for me it happened to move a closing paren from a parameter list in a primary constructor and move it down a few methods). Parenthesis should not be treated special. I am fine with having a screen full of red underlines for a few keystrokes, but it's not funny to search 10 minutes for a syntax error non-locally connected to the place I edit.
Reporter dragos
I think you'd market this as a feature, but it is extremely counter-intuitive: one cannot insert closing parens that have not been open! Moreover, closing an 'extra' parenthesis will just eat the last seen closing parenthesis, and and move it to the cursor. That's really not what you want (for me it happened to move a closing paren from a parameter list in a primary constructor and move it down a few methods). Parenthesis should not be treated special. I am fine with having a screen full of red underlines for a few keystrokes, but it's not funny to search 10 minutes for a syntax error non-locally connected to the place I edit.
Leave a comment
on 2008-02-28 01:36 *
By tracImporter
Trac author: mcdirmid
I'm not sure how to fix this. On the one hand, nothing will work if the parenthesis are balanced (no, we can't even run the parser or the type checker!), and on the other hand, I know lots of people like to edit with parans unbalanced. Maybe just make an option (note nothing will work if your paranthesis are unbalanced: no content assist, no syntax highlighting).
I'll try to harden paran completion today and make completions a bit more reasonable.
I'm not sure how to fix this. On the one hand, nothing will work if the parenthesis are balanced (no, we can't even run the parser or the type checker!), and on the other hand, I know lots of people like to edit with parans unbalanced. Maybe just make an option (note nothing will work if your paranthesis are unbalanced: no content assist, no syntax highlighting).
I'll try to harden paran completion today and make completions a bit more reasonable.
on 2008-02-28 09:26 *
By tracImporter
Trac author: dragos
I actually like the fact that it automatically inserts closing parenthesis. What I don't like is that when I accidentally close a parenthesis a second time, it choses a previously encountered one and it moves it down... or simply doesn't allow me to type it. I found this annoying, especially if it moves braces from other methods (I'm not 100% it happened, but I think it did). Maybe just make this a bit less intrusive?
I actually like the fact that it automatically inserts closing parenthesis. What I don't like is that when I accidentally close a parenthesis a second time, it choses a previously encountered one and it moves it down... or simply doesn't allow me to type it. I found this annoying, especially if it moves braces from other methods (I'm not 100% it happened, but I think it did). Maybe just make this a bit less intrusive?
Trac author: mcdirmid
I made paren completion smarter. It won't move a paren that you manually typed. Should be more robust now.
I made paren completion smarter. It won't move a paren that you manually typed. Should be more robust now.
on 2009-01-14 12:54 *
By tracImporter
Closed As: fixed