fix note autocomplete for non-recent notes

This commit is contained in:
zadam 2020-09-03 22:37:51 +02:00
parent 7787fa1758
commit 15d94e91db
2 changed files with 8 additions and 1 deletions

View File

@ -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();

View File

@ -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
}