Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Can trigger showTopVotedSolution from keyboard shortcut#399

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jdneo merged 2 commits intomasterfromcs/issue-368
Aug 27, 2019
Merged
Changes fromall 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
12 changes: 8 additions & 4 deletionssrc/commands/show.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,7 +13,7 @@ import { leetCodeManager } from "../leetCodeManager";
import { IProblem, IQuickItemEx, languages, ProblemState } from "../shared";
import { getNodeIdFromFile } from "../utils/problemUtils";
import { DialogOptions, DialogType, openSettingsEditor, promptForOpenOutputChannel, promptForSignIn, promptHintMessage } from "../utils/uiUtils";
import { selectWorkspaceFolder } from "../utils/workspaceUtils";
import {getActiveFilePath,selectWorkspaceFolder } from "../utils/workspaceUtils";
import * as wsl from "../utils/wslUtils";
import { leetCodePreviewProvider } from "../webview/leetCodePreviewProvider";
import { leetCodeSolutionProvider } from "../webview/leetCodeSolutionProvider";
Expand DownExpand Up@@ -71,11 +71,15 @@ export async function searchProblem(): Promise<void> {

export async function showSolution(input: LeetCodeNode | vscode.Uri): Promise<void> {
let problemInput: string | undefined;
if (input instanceof LeetCodeNode) {
if (input instanceof LeetCodeNode) { // Triggerred from explorer
problemInput = input.id;
} else if (input instanceof vscode.Uri) {
} else if (input instanceof vscode.Uri) { // Triggerred from Code Lens/context menu
problemInput = `"${input.fsPath}"`;
} else {
} else if (!input) { // Triggerred from command
problemInput = await getActiveFilePath();
}

if (!problemInput) {
vscode.window.showErrorMessage("Invalid input to fetch the solution data.");
return;
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp