update antedit

This commit is contained in:
lxsang
2021-10-12 11:42:15 +02:00
parent 63a101d142
commit 44d877ca6e
8 changed files with 8 additions and 6 deletions

View File

@ -362,10 +362,10 @@ namespace OS {
if (!e.data || !e.data.path) {
return;
}
this.addRecent(e.data.path);
if (e.data.type === "dir") {
return;
}
this.addRecent(e.data.path);
return this.eum.active.openFile(
e.data.path.asFileHandle() as EditorFileHandle
);
@ -904,7 +904,7 @@ namespace OS {
if (this.setting.recent.includes(file)) {
return;
}
this.setting.recent.push(file);
this.setting.recent.unshift(file);
if(this.setting.recent.length > 10)
this.setting.recent = this.setting.recent.slice(0, 10);