Skip to content

Commit

Permalink
Merge pull request #447 from KxSystems/ee-run
Browse files Browse the repository at this point in the history
Fix for run q file not using the current editor contents
  • Loading branch information
ecmel authored Nov 5, 2024
2 parents 9dd4f8a + 58bf260 commit 7605a62
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,20 @@ All notable changes to the **kdb VS Code extension** are documented in this file

### Enhancements

- Semantic highlighting for local variables
- Display version of Insights server connected

### Fixes

- Fix for results tab flickering , improving of UX
- Fix for Issue [#382](https://github.com/KxSystems/kx-vscode/issues/382)
- Fix for run q file not using the current editor contents
- Fix for autocomplete for new and unsaved documents

### Internal Improvements

- Migrate to Shoelace Web Components
- Move server object logic away from models code

# v1.8.0

Expand Down
17 changes: 14 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,20 @@ export async function activate(context: ExtensionContext) {
await stopLocalProcess(viewItem);
},
),
commands.registerCommand("kdb.terminal.run", () => {
const filename = ext.activeTextEditor?.document.fileName;
if (filename) runQFileTerminal(filename);
commands.registerCommand("kdb.terminal.run", async () => {
if (ext.activeTextEditor) {
const uri = Uri.joinPath(
ext.context.globalStorageUri,
"kdb-vscode-repl.q",
);
const text = ext.activeTextEditor.document.getText();
try {
await workspace.fs.writeFile(uri, Buffer.from(text, "utf-8"));
runQFileTerminal(`"${uri.fsPath}"`);
} catch (error) {
kdbOutputLog(`Unable to write temp file: ${error}`, "ERROR");
}
}
}),
commands.registerCommand("kdb.terminal.start", () => {
if (env.QHOME) {
Expand Down

0 comments on commit 7605a62

Please sign in to comment.