Hello,
I wonder if it would be possible to add two variables to the build system. $selection_start and $selection_length.
$selection_start would be the (zero-based) index of the first selected character within $file.
$selection_length would be the count of selected characters from $selection_start within $file.
If there is no current selection (or when there are multiple), $selection_length would be zero, and $selection_start would be the current caret position (or zero).
I am a SQL developer by trade and often work with large scripts containing many different queries. I’m currently using a simple query runner to execute script files as a whole, which works fine, but forces me to copy/paste (sub)queries to seperate files when I want to run them in isolation. The above addition would allow me to have my query runner execute just the selected part of a script file, which would save me a lot of time.
Regards,
Peter.