mtxr/vscode-sqltools

Error when using assigned shortcut to open or save results

Opened this issue · 0 comments

Describe the bug
Assigning a shortcut and using it to open or save the results yields a Can't find active results view error and does not execute the desired action. It can, however, be executed by pressing the respective button in the results view.

The SQLTools output channel log shows: INFO (ext): EXECUTING COMMAND => sqltools.openResults without any other information. The webview developer console also shows no additional output.
However, in the bottom right, a notification pops up saying Can't find active results view.

To Reproduce
Steps to reproduce the behavior:

  1. Assign a shortcut to command sqltools.openResults (or sqltools.saveResults), e.g. cmd+e cmd+o
  2. Connect to a database
  3. Run a query that returns a result, like a simple SELECT * FROM <table>;
  4. Observe that the results view opens
  5. Press assigned shortcut (cmd+e cmd+o)
  6. Observe that, depending on the settings, the results do not open in csv (or json), neither does the prompt to ask for csv or json. Instead, a notification pops up in the bottom right saying: Can't find active results view
  7. Observe that pressing the button in the results view does open and export/save the output correctly as csv/json.

Expected behavior
Shortcut assigned to open/save results command should behave exactly the same as pressing the respective button in the results view.

Screenshots
N/A

Desktop (please complete the following information):

  • SQLTools Version: v0.28.3
  • VS Code Version: 1.95.3
  • OS: Mac
  • Driver:
    • PostgreSQL/Redshift
    • MySQL/MariaDB (untested)
    • MSSQL/Azure (untested)
    • SQLite (untested)
    • Other? Which... (untested)
  • Database version: PostgreSQL 16.2

Additional context
N/A