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

scide: sc_editor: include parenthesis in regionAroundCursor() #892

Merged
merged 1 commit into from
Jun 30, 2013

Conversation

gusano
Copy link
Member

@gusano gusano commented Jun 30, 2013

When evaluating a region, the evaluated code excludes the parenthesis
which define the region. If they are included instead, we avoid a
parse error when evaluating array shortcut notations like (1..3).

When evaluating a region, the evaluated code excludes the parenthesis
which define the region. If they are included instead, we avoid a
parse error when evaluating array shortcut notations like `(1..3)`.

Signed-off-by: Yvan Volochine <yvan.volochine@gmail.com>
@gusano
Copy link
Member Author

gusano commented Jun 30, 2013

@jleben @timblechmann

Reported there:
http://comments.gmane.org/gmane.comp.audio.supercollider.devel/58943

Note that I'm not sure that it's the best fix as it would allow the following syntax to be correct:

(
1..10
)

But in the current state, the following is also correct so I guess this change would not harm:

(
"hello
"
)

@timblechmann
Copy link
Contributor

afaict, both code examples are valid sclang code. your patch looks good to me, though we don't need specific handling for Events in bracketPairDefinesRegion() anymore

timblechmann added a commit that referenced this pull request Jun 30, 2013
scide: sc_editor: include parenthesis in regionAroundCursor()
@timblechmann timblechmann merged commit 814cbfc into supercollider:master Jun 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants