Skip to content

Execute selection, from cursor, and current batch (#53)#54

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/issue-53-execute-selection
Mar 6, 2026
Merged

Execute selection, from cursor, and current batch (#53)#54
erikdarlingdata merged 1 commit intodevfrom
feature/issue-53-execute-selection

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • Execute highlighted text: F5/Ctrl+E/Ctrl+L now run only the selected text when a selection exists
  • Execute from Cursor: right-click context menu, runs from cursor position to end of editor
  • Execute Current Batch: right-click context menu, runs the batch between GO separators where the cursor sits
  • Multi-statement plan fix: both estimated and actual plan executors now collect all result sets and merge ShowPlanXML documents, so all statements appear in the Statements panel

Closes #53

Test plan

  • Two statements without GO — Ctrl+E shows both in Statements panel
  • Highlight first statement only — Ctrl+E shows only that plan
  • Right-click → Execute from Cursor at first statement — shows both
  • Two statements separated by GO — right-click → Execute Current Batch on first shows only first
  • Cancel during multi-statement execution removes the tab

🤖 Generated with Claude Code

- F5/Ctrl+E/Ctrl+L now execute only selected text when a selection exists
- Right-click context menu adds "Execute from Cursor" and "Execute Current Batch"
- Current batch parses GO separators (case-insensitive, own line) matching SSMS
- Fix multi-statement plan capture: both executors now collect all result sets
  and merge ShowPlanXML documents so all statements appear in the viewer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 99cd86f into dev Mar 6, 2026
2 checks passed
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.

1 participant