From d6b875f602e3646109f54fd3461b516b1585afea Mon Sep 17 00:00:00 2001 From: pekepeke Date: Wed, 26 Nov 2008 15:02:44 +0000 Subject: 2.0pre対応 refcontrol, autoproxychanger 追加 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24976 d0d07461-0603-4401-acd4-de1884942a52 --- direct_bookmark.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'direct_bookmark.js') diff --git a/direct_bookmark.js b/direct_bookmark.js index 58c20f9..88ee223 100644 --- a/direct_bookmark.js +++ b/direct_bookmark.js @@ -632,14 +632,17 @@ d.error(function(e){liberator.echoerr("direct_bookmark.js: Exception throwed! " + e);liberator.log(e);}); setTimeout(function(){first.call();},0); },{ - completer: function(filter){ + completer: function(context, arg, special){ + let filter = context.filter; var match_result = filter.match(/((?:\[[^\]]*\])*)\[?(.*)/); //[all, commited, now inputting] var m = new RegExp(XMigemoCore && isUseMigemo ? "^(" + XMigemoCore.getRegExp(match_result[2]) + ")" : "^" + match_result[2],'i'); var completionList = []; if(liberator.plugins.direct_bookmark.tags.length == 0) getTags().call([]); - return [match_result[1].length, [["[" + tag + "]","Tag"] - for each (tag in liberator.plugins.direct_bookmark.tags) if (m.test(tag) && match_result[1].indexOf('[' + tag + ']') < 0)]]; + context.title = ['Tag','Description']; + context.advance( match_result[1].length ); + context.completions = [["[" + tag + "]","Tag"] + for each (tag in liberator.plugins.direct_bookmark.tags) if (m.test(tag) && match_result[1].indexOf('[' + tag + ']') < 0)]; }, options: [ [['-s','-service'], liberator.modules.commands.OPTION_STRING], -- cgit v1.2.3