Commit preview panel at the bottom; open other repositories from a recent list or a folder picker
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
export const MAX_RECENTS = 12;
|
||||
|
||||
/** Puts `path` first, drops an older copy of it, and keeps at most MAX_RECENTS paths. */
|
||||
export function addRecent(list: string[], path: string): string[] {
|
||||
return [path, ...list.filter((p) => p !== path)].slice(0, MAX_RECENTS);
|
||||
}
|
||||
Reference in New Issue
Block a user