Skip to content

Build your personal knowledge base with Trilium Notes

fix note autocomplete for non-recent notes

zadam15d94e91db2b
diff --git a/src/public/app/widgets/attribute_editor.js b/src/public/app/widgets/attribute_editor.js
index 4f5ceec02d..86c50e909c 100644
--- a/src/public/app/widgets/attribute_editor.js
+++ b/src/public/app/widgets/attribute_editor.js
@@ -467,7 +467,13 @@ export default class AttributeEditorWidget extends TabAwareWidget {
}
}
- this.textEditor.setData($attributesContainer.html() + " ");
+ let htmlAttrs = $attributesContainer.html();
+
+ if (htmlAttrs.length > 0) {
+ htmlAttrs += " ";
+ }
+
+ this.textEditor.setData(htmlAttrs);
if (saved) {
this.lastSavedContent = this.textEditor.getData();
diff --git a/src/services/search/services/search.js b/src/services/search/services/search.js
index 4fa44b172c..d10cf86829 100644
--- a/src/services/search/services/search.js
+++ b/src/services/search/services/search.js
@@ -126,6 +126,7 @@ function searchNotesForAutocomplete(query) {
return searchResults.map(result => {
return {
notePath: result.notePath,
+ noteTitle: noteCacheService.getNoteTitle(result.noteId),
notePathTitle: result.notePathTitle,
highlightedNotePathTitle: result.highlightedNotePathTitle
}