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

"Run Current Query" keybind no longer behaving as expected #10538

Closed
JFitzMan opened this issue May 21, 2020 · 2 comments · Fixed by #10557
Closed

"Run Current Query" keybind no longer behaving as expected #10538

JFitzMan opened this issue May 21, 2020 · 2 comments · Fixed by #10557

Comments

@JFitzMan
Copy link

Issue Type: Bug

In previous versions the expected behavior of this keybind was to run either the currently selected query or run whichever query the cursor was currently active on. This also used to be able to handle comments included within the queries and selections, as well as multiple queries in the same batch. There are a couple of easily reproducable issues now:

  1. Pressing this keybind now runs the entire script regardless of cursor position.

  2. Highlighting multiple queries and pressing this keybind results in only the top query being run. In the past, it would run the entire selection. Example: highlight and run both of these in the same batch
    select 1
    select 1

  3. If there is a comment above a query and you include this in the highlighted text, the query will not run. Example: highlight the comment and the select and run.
    -- the following gets 1
    select 1

  4. If you have a query commented out and highlight it to run, it will not run. Example: run the select 1 by highlighting everything besides the comment characters
    -- select 1

Azure Data Studio version: azuredatastudio 1.18.0 (2acd37a, 2020-05-19T23:54:30.554Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 x 3193)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 11.91GB (5.14GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (17)
Extension Author (truncated) Version
bracket-pair-colorizer Coe 1.0.60
gitlens eam 9.8.1
ssmskeymap kev 1.1.0
query-history Mic 0.1.0
server-report Mic 0.2.2
whoisactive Mic 0.1.4
azure-account ms- 0.8.4
powershell ms- 2019.5.0
vsliveshare ms- 1.0.337
team ms- 1.149.2
azdata-sanddance msr 1.3.9
sql-search Red 0.3.3
simple-data-scripter sea 0.1.0
vscodeintellicode Vis 1.2.1
vscode-icons vsc 8.8.0
snippet-creator nik 0.0.4
poor-sql-formatter WSR 0.1.0

(3 theme extensions excluded)

@abist abist changed the title "Run Current Query" kebind no longer behaving as expected "Run Current Query" keybind no longer behaving as expected May 21, 2020
@kburtram kburtram assigned kburtram and unassigned anthonydresser May 21, 2020
@aasimkhan30 aasimkhan30 assigned aasimkhan30 and unassigned kburtram May 26, 2020
@kburtram
Copy link
Member

I'll close this issue based on the workaround in release/1.18. We can use one of the duplicate issues to track the longer-term fix in master. @JFitzMan a hotfix for this is planned for tomorrow if no other blocking bugs are found.

@Charles-Gagnon Charles-Gagnon reopened this Jun 8, 2020
aasimkhan30 added a commit that referenced this issue Jun 8, 2020
…10538) (#10557)

* -"Run current" command runs the entire selection instead of only first statement in the selection

* -brought some logic back from the  old code to correct the behavior

* -Added unit tests for runCurrent command

* -Fixed a comment

* - Added checks for run input parameters

* -Added some extra checks

* -Fixed some spacing issue

* Changed to using verify instead of a counter variable
@Charles-Gagnon Charles-Gagnon reopened this Jun 8, 2020
@kburtram kburtram removed the Approved label Jun 8, 2020
aasimkhan30 added a commit that referenced this issue Jun 8, 2020
…10538) (#10557)

* -"Run current" command runs the entire selection instead of only first statement in the selection

* -brought some logic back from the  old code to correct the behavior

* -Added unit tests for runCurrent command

* -Fixed a comment

* - Added checks for run input parameters

* -Added some extra checks

* -Fixed some spacing issue

* Changed to using verify instead of a counter variable
kburtram pushed a commit that referenced this issue Jun 9, 2020
…10538) (#10557) (#10804)

* -"Run current" command runs the entire selection instead of only first statement in the selection

* -brought some logic back from the  old code to correct the behavior

* -Added unit tests for runCurrent command

* -Fixed a comment

* - Added checks for run input parameters

* -Added some extra checks

* -Fixed some spacing issue

* Changed to using verify instead of a counter variable
@kburtram
Copy link
Member

kburtram commented Jun 9, 2020

Fixed in release/1.19. Let's sync up in future meeting how to avoid regressions related to fixes directly in release branches.

@kburtram kburtram closed this as completed Jun 9, 2020
@adsbot adsbot bot locked and limited conversation to collaborators Jul 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.