Skip to content

Query results tab always opens to the right of the script pane, ignoring user-repositioned layout #266

@philipnye

Description

@philipnye

Describe the bug

When Open Query Results In Tab By Default is enabled, running a query always opens the results tab immediately to the right of the pane containing the SQL script - regardless of where the results tab has been manually moved.

Steps to reproduce

  1. Enable Open Query Results In Tab By Default in extension settings.
  2. Open a SQL script in a pane (pane 1).
  3. Open another script and move it to form a fresh pane (pane 2)
  4. Run the SQL query - results open in a new tab in pane 2, to the right.
  5. Drag the results tab to form a third pane (pane 3), to the right of pane 2.
  6. Run the query again.

Expected behaviour

The results tab stays open in pane 3 (its current position), with updated results.

Actual behaviour

The results tab closes and reopens in pane 2 (immediately to the right of the script pane), discarding the user's layout.

Comparison with mssql extension

The mssql extension with Open Query Results In Tab By Default enabled does not exhibit this behaviour - it respects the position the results tab has been moved to (just refreshing the results, rather than closing and reopening a results tab).

Environment

VS Code version: 1.121.0
Extension version: 1.22.1
OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions