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

Fix for run q file not using the current editor contents #447

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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