Skip to content

Commit

Permalink
Fixes #1100
Browse files Browse the repository at this point in the history
  • Loading branch information
zefhemel committed Sep 29, 2024
1 parent 3b13787 commit 2ef43bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion plugs/editor/complete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,14 @@ export async function pageComplete(completeEvent: CompleteEvent) {
// A [[wikilink]]
if (pageMeta.displayName) {
const decoratedName = namePrefix + pageMeta.displayName;
let boost = new Date(pageMeta.lastModified).getTime();
if (pageMeta._isAspiring) {
boost = -Infinity;
}
completions.push({
label: pageMeta.displayName,
displayLabel: decoratedName,
boost: new Date(pageMeta.lastModified).getTime(),
boost,
apply: pageMeta.tag === "template"
? pageMeta.name
: `${pageMeta.name}|${pageMeta.displayName}`,
Expand Down
2 changes: 1 addition & 1 deletion web/components/page_navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function PageNavigator({
orderId = -pageMeta.lastOpened;
}
// 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
orderId = Infinity;
}
Expand Down

0 comments on commit 2ef43bd

Please sign in to comment.