Merge pull request #455 from ueokande/fix-bookmark-limitation
Limit bookmark items on completion
This commit is contained in:
commit
1b77846382
2 changed files with 7 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Vim Vixen",
|
"name": "Vim Vixen",
|
||||||
"description": "Vim Vixen",
|
"description": "Vim Vixen",
|
||||||
"version": "0.17",
|
"version": "0.18",
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "resources/icon_48x48.png",
|
"48": "resources/icon_48x48.png",
|
||||||
"96": "resources/icon_96x96.png"
|
"96": "resources/icon_96x96.png"
|
||||||
|
|
|
@ -183,10 +183,11 @@ export default class CompletionsInteractor {
|
||||||
|
|
||||||
async queryBookmarkItems(name, keywords) {
|
async queryBookmarkItems(name, keywords) {
|
||||||
let bookmarks = await this.completionRepository.queryBookmarks(keywords);
|
let bookmarks = await this.completionRepository.queryBookmarks(keywords);
|
||||||
return bookmarks.map(page => new CompletionItem({
|
return bookmarks.slice(0, COMPLETION_ITEM_LIMIT)
|
||||||
caption: page.title,
|
.map(page => new CompletionItem({
|
||||||
content: name + ' ' + page.url,
|
caption: page.title,
|
||||||
url: page.url
|
content: name + ' ' + page.url,
|
||||||
}));
|
url: page.url
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue