Limit bookmark items on completion
This commit is contained in:
parent
7f2fab55a5
commit
b7ed6eb254
1 changed files with 6 additions and 5 deletions
|
@ -183,10 +183,11 @@ export default class CompletionsInteractor {
|
|||
|
||||
async queryBookmarkItems(name, keywords) {
|
||||
let bookmarks = await this.completionRepository.queryBookmarks(keywords);
|
||||
return bookmarks.map(page => new CompletionItem({
|
||||
caption: page.title,
|
||||
content: name + ' ' + page.url,
|
||||
url: page.url
|
||||
}));
|
||||
return bookmarks.slice(0, COMPLETION_ITEM_LIMIT)
|
||||
.map(page => new CompletionItem({
|
||||
caption: page.title,
|
||||
content: name + ' ' + page.url,
|
||||
url: page.url
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue