Bug
The editor.openFileInVSCode command always fails with "No active editor" when invoked from the command palette.
Root Cause
Opening the command palette moves focus away from the editor pane, which causes getActiveEditor() to return null. By the time the command handler runs, there is no active editor to read the file path and cursor position from.
Expected Behavior
The command should remember which editor was focused before the command palette opened, and use that context when executing.
Steps to Reproduce
- Open a file in the editor
- Open the command palette (Cmd+Shift+P)
- Run "Open Active File in VS Code"
- Toast appears: "No active editor"
Suggested Fix
Track the "last focused editor" separately from the currently focused one, so commands invoked via the palette can reference the editor that was active immediately before the palette opened.
🤖 Generated with Claude Code
Bug
The
editor.openFileInVSCodecommand always fails with "No active editor" when invoked from the command palette.Root Cause
Opening the command palette moves focus away from the editor pane, which causes
getActiveEditor()to returnnull. By the time the command handler runs, there is no active editor to read the file path and cursor position from.Expected Behavior
The command should remember which editor was focused before the command palette opened, and use that context when executing.
Steps to Reproduce
Suggested Fix
Track the "last focused editor" separately from the currently focused one, so commands invoked via the palette can reference the editor that was active immediately before the palette opened.
🤖 Generated with Claude Code