Skip to content

Commit

Permalink
remove old implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
riotrah committed Mar 31, 2024
1 parent 84d9c7d commit a32e2a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
2 changes: 0 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import * as definition from './providers/definition';
import { CalvaSignatureHelpProvider } from './providers/signature';
import testRunner from './testRunner';
import annotations from './providers/annotations';
import * as select from './select';
import eval from './evaluate';
import refresh from './refresh';
import * as greetings from './greet';
Expand Down Expand Up @@ -258,7 +257,6 @@ async function activate(context: vscode.ExtensionContext) {
runCustomREPLCommand: snippets.evaluateCustomCodeSnippetCommand,
runNamespaceTests: () => testRunner.runNamespaceTestsCommand(testController),
runTestUnderCursor: () => testRunner.runTestUnderCursorCommand(testController),
selectCurrentForm: select.selectCurrentForm,
sendCurrentFormToOutputWindow: outputWindow.appendCurrentForm,
openFiddleForSourceFile: fiddleFiles.openFiddleForSourceFile,
evaluateFiddleForSourceFile: fiddleFiles.evaluateFiddleForSourceFile,
Expand Down
25 changes: 0 additions & 25 deletions src/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,3 @@ export function getEnclosingFormSelection(
}
}
}

function selectForm(
document = {},
selectionFn: (
doc: vscode.TextDocument,
pos: vscode.Position,
topLevel: boolean
) => vscode.Selection | undefined,
toplevel: boolean
) {
const editor = util.getActiveTextEditor(),
doc = util.getDocument(document),
selection = editor.selections[0];

if (selection.isEmpty) {
const codeSelection = selectionFn(doc, selection.active, toplevel);
if (codeSelection) {
editor.selections = [codeSelection];
}
}
}

export function selectCurrentForm(document = {}) {
selectForm(document, getFormSelection, false);
}

0 comments on commit a32e2a7

Please sign in to comment.