pull/1110/head
Zef Hemel 2024-09-29 13:39:08 +02:00
parent 3b1378717c
commit 2ef43bd56d
2 changed files with 6 additions and 2 deletions

View File

@ -130,10 +130,14 @@ export async function pageComplete(completeEvent: CompleteEvent) {
// A [[wikilink]] // A [[wikilink]]
if (pageMeta.displayName) { if (pageMeta.displayName) {
const decoratedName = namePrefix + pageMeta.displayName; const decoratedName = namePrefix + pageMeta.displayName;
let boost = new Date(pageMeta.lastModified).getTime();
if (pageMeta._isAspiring) {
boost = -Infinity;
}
completions.push({ completions.push({
label: pageMeta.displayName, label: pageMeta.displayName,
displayLabel: decoratedName, displayLabel: decoratedName,
boost: new Date(pageMeta.lastModified).getTime(), boost,
apply: pageMeta.tag === "template" apply: pageMeta.tag === "template"
? pageMeta.name ? pageMeta.name
: `${pageMeta.name}|${pageMeta.displayName}`, : `${pageMeta.name}|${pageMeta.displayName}`,

View File

@ -41,7 +41,7 @@ export function PageNavigator({
orderId = -pageMeta.lastOpened; orderId = -pageMeta.lastOpened;
} }
// Or it's the currently open page // Or it's the currently open page
if (currentPage && currentPage === pageMeta.name) { if (currentPage && currentPage === pageMeta.name || pageMeta._isAspiring) {
// ... then we put it all the way to the end // ... then we put it all the way to the end
orderId = Infinity; orderId = Infinity;
} }