Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

feat(search): Continue in Go to File when Recent Files has no match (#166)

l0ng-ai097169cefc9d
diff --git a/src/features/search/recent/RecentPopups.tsx b/src/features/search/recent/RecentPopups.tsx
index d2674f7df..f6688c18f 100644
--- a/src/features/search/recent/RecentPopups.tsx
+++ b/src/features/search/recent/RecentPopups.tsx
@@ -31,6 +31,7 @@ import {
switcherToolWindows,
type RecentFileItem,
} from "./model";
+import { showSearchEverywhere } from "../everywhere/store";
import { cycleSwitcher, hideRecentPopup, showRecentPopup, useRecentPopup } from "./store";
import styles from "./RecentPopups.module.css";
import { tx } from "@/platform/i18n";
@@ -174,7 +175,11 @@ function RecentFilesDialog() {
const onKeyDown = (e: KeyboardEvent<HTMLElement>) => {
if (e.key === "Enter") {
e.preventDefault();
- if (effectiveColumn === "files") openFile(files[fIndex], e.shiftKey);
+ if (effectiveColumn === "files" && !files[fIndex] && query.trim()) {
+ // Nothing recent matches: carry the text over to Go to File.
+ const text = query.trim();
+ afterClose(() => showSearchEverywhere("files", { query: text }));
+ } else if (effectiveColumn === "files") openFile(files[fIndex], e.shiftKey);
else openTool(tools[tIndex]?.tw);
return;
}