Skip to content

Commit 4c8c3d5

Browse files
committed
fix: 完善最近文件界面的搜索过滤显示逻辑
1 parent 5a22c1b commit 4c8c3d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/sub/RecentFilesWindow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function RecentFilesWindow({ winId = "" }: { winId?: string }) {
5959
}
6060
setCurrentPreselect(0); // 一旦有输入,就设置下标为0
6161
setSearchString(inputString);
62-
setRecentFilesFiltered(recentFiles.filter((file) => file.uri.toString().includes(inputString)));
62+
setRecentFilesFiltered(recentFiles.filter((file) => decodeURI(file.uri.toString()).includes(inputString)));
6363
};
6464

6565
useEffect(() => {
@@ -148,6 +148,6 @@ RecentFilesWindow.open = () => {
148148
SubWindow.create({
149149
title: "最近打开的文件",
150150
children: <RecentFilesWindow />,
151-
rect: new Rectangle(new Vector(50, 50), new Vector(window.innerWidth - 300, window.innerHeight - 100)),
151+
rect: new Rectangle(new Vector(50, 50), new Vector(window.innerWidth - 100, window.innerHeight - 100)),
152152
});
153153
};

0 commit comments

Comments
 (0)