-
Notifications
You must be signed in to change notification settings - Fork 758
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
[SC-IDE] Evaluate a line within a region (with the same shortcut) #403
Comments
Ctrl-shift-return evaluates the line only. It might be debatable whether the so-called "default" behavior (that is, the behavior of the shorter key binding ctrl-return) should evaluate only a line or the whole region. But, there is a way to evaluate the line only. I tend to think that ctrl-return and ctrl-shift-return should be reversed. If we assume that most users will be coming to SC-IDE from sc.app, they will expect the most basic "execute" keystroke to run the line or an explicitly selected block and not "helpfully" implicitly select a larger block. They expect to have to do something extra to run an entire region. Better to err on the side of caution and tend towards executing shorter code, rather than creating lots of opportunities for users to run initialization code accidentally and thereby leak objects etc. |
I just got hit by this. I think the following is quite an unpleasant effect of the current behaviour:
I had my cursor inside the brackets and pressed ctrl+return. I got weird answers because it was not evaluating the full line but only the subset in the brackets. Maybe I would get used to this but it's quite awkward that the execution of such a simple statement can lead to two different results depending on where my cursor is... |
personally, i evaluate regions more often with lines, but maybe we can improve the behavior:
in general, i prefer a smart design, which might be not what scapp as been doing. we don't want to re-implement scapp |
Yes, I agree, no need to re-implement scapp - and I like the logic of the behaviour you listed there tim. |
done |
Trying to evaluate a line inside a region always evaluates the region.
That is no possible to do with the same shortcut as in sc.app and gedit for example.
Selecting text works but the issue is that it differs form the traditional behavior.
The text was updated successfully, but these errors were encountered: