[Feature]: "Execute current line" improvements
Describe the new feature
A few ideas to make the "Execute current line" operation more intuitive and accessible:
- Add counterparts to the other Execute shortcuts besides F5, i.e., Shift-Ctrl-R and Shift-Ctrl-Return.
- Rename the operation to "Execute current statement", which I suppose is the intended meaning and what currently happens as long as the cursor is on the first line of a multiline statement.
- Have the feature execute the entire statement even if the cursor is not on the first line.
Does this feature exist in another product or project? Please provide a link
No response
Do you have a screenshot? Please add screenshots to help explain your idea.
No response
Rename the operation to "Execute current statement" ...
That sounds pretty reasonable. We'll need to get the translations updated again though. :wink:
It sounds reasonable and I don't think it will be difficult to fix. However, we're almost done with the translation for the next release, so we may want to consider fixing it after the next release. @justinclift What do you think about this? π
Probably do it for the next release. We've already had a lot of the translations done for this one. :wink:
Hi @bintoro, I've added a commit to a new branch that applies the improvements you suggested, but as comments above, it will most likely not be in this release.
Have the feature execute the entire statement even if the cursor is not on the first line.
By the way, can you elaborate a bit more on the above? because when I tested it, it seems to be work as you said. Thanks for your patience.
Have the feature execute the entire statement even if the cursor is not on the first line.
By the way, can you elaborate a bit more on the above? because when I tested it, it seems to be work as you said. Thanks for your patience.
Iβm sorry, I had totally missed this question.
So yeah, upon further investigation, the command isnβt completely broken. But it seems that when searching backwards from the cursor to locate the first line of the current statement, only explicit semicolons are recognized; the beginning of the text area is not.
To illustrate:
| Cursor on line | Shift+F5 executes |
|---|---|
| 1 | 1st statement β |
| 2 | 2nd line (error) β |
| 3 | 3rd line (error) β |
| 4 | 4th line (error) β |
| 5 | nothing β |
| 6..10 | 2nd statement β |
But if I prepend a semicolon to the first SELECT, everything works as expected.
Oh, that sounds like a good catch. @mgrojo I think this will be of interest to you. :smile:
Easy workaround... just highlight the statement you want to execute. Works every time. ;)
Should be fixed, in any case. But the last time I looked at this was not straightforward; this part of the code is complex.
Uhmm, I remembered something more cumbersome. I believe it's easy after all. Looking at it.
So yeah, upon further investigation, the command isnβt completely broken. But it seems that when searching backwards from the cursor to locate the first line of the current statement, only explicit semicolons are recognized; the beginning of the text area is not. [...] But if I prepend a semicolon to the first
SELECT, everything works as expected.
This bug should be fixed now in the next nightly build and will enter the next release (v3.13.0).
@mgrojo Would it make sense to merge changes to 1 and 2 into the master branch after the next release? π€
@lucydodo , yes, of course, it makes sense. As soon as we have the release branch, you are free to merge it.
@mgrojo Thanks, I'll merge it after the when we create next release branch. @bintoro As mentioned above, this will be reflected in the near future, and I'll elt you know when that happens. Thanks.
@lucydodo The new v3.13.x release branch was created by @mgrojo yesterday, so merging waiting stuff into master should now be ok. :smile:
@lucydodo but check first with @deepsidhu1313 , I understood that he still needs some time for master to be frozen.
Hey, sorry for the master branch thing, I can switch all the builds to 3.13.x branch temporarily if we are not planning 3.13.x release soon, or if you need this change on master urgently.
@justinclift @mgrojo Thanks for letting me know.
@deepsidhu1313 Don't worry, Take your time. :)