дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 03:05:40 +02:00
feat(search): Continue in Go to File when Recent Files has no match (#166)
Pressing Enter in Recent Files when the filter matches nothing now opens Go to File with the typed text, so the search carries on over the whole project.
Цей коміт міститься в:
1 джерело
c7f75cb693
коміт
097169cefc
1 file changed
+6
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Заблокувати користувача