From 77382ad8b9417c4e1b546f4f9ef1ce9243d5dfd5 Mon Sep 17 00:00:00 2001 From: secondlife Date: Sat, 21 Feb 2009 01:21:44 +0000 Subject: キャッシュするように git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@30402 d0d07461-0603-4401-acd4-de1884942a52 --- history-search-backward.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'history-search-backward.js') diff --git a/history-search-backward.js b/history-search-backward.js index b7f863e..4444812 100644 --- a/history-search-backward.js +++ b/history-search-backward.js @@ -64,6 +64,9 @@ liberator.globalVariables.history_search_backward_map = ['']; } let command = commandline.command || ''; + let completionsList = [[key, i] for ([i, key] in storage['history-command'])]. + filter(function([key, i]) key).reverse(); + commandline.input('bck-i-search: ', function(str) { try { liberator.echo(liberator.execute(str)); @@ -73,8 +76,7 @@ liberator.globalVariables.history_search_backward_map = ['']; }, { completer: function(context) { context.title = ['CommandLine History', 'INDEX']; - context.completions = [[key, i] for ([i, key] in storage['history-command'])]. - filter(function([key, i]) key).reverse(); + context.completions = completionsList; }, onChange: function() { showCompletions(); -- cgit v1.2.3