UI: Show errors if using nano/vim with patterns that do not match any files (#2515)

This commit is contained in:
catloversg
2026-02-20 00:53:01 +07:00
committed by GitHub
parent 2b542257a9
commit 00b9034980

View File

@@ -46,7 +46,12 @@ export function commonEditor(
// Glob of existing files
if (pattern.includes("*") || pattern.includes("?")) {
for (const [path, file] of getGlobbedFileMap(pattern, server, Terminal.currDir)) {
const globbedFileMap = getGlobbedFileMap(pattern, server, Terminal.currDir);
if (globbedFileMap.size === 0) {
Terminal.error(`No files matching ${pattern}`);
return;
}
for (const [path, file] of globbedFileMap) {
if (isLegacyScript(path)) {
hasLegacyScript = true;
}