From 00b1f584a13c4cae8b0b84b6e3ffc67f7b9d037b Mon Sep 17 00:00:00 2001 From: anekos Date: Sun, 23 Nov 2008 00:35:01 +0000 Subject: follow the new completer. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24676 d0d07461-0603-4401-acd4-de1884942a52 --- umihara.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'umihara.js') diff --git a/umihara.js b/umihara.js index 637fb26..49a871b 100644 --- a/umihara.js +++ b/umihara.js @@ -93,11 +93,17 @@ let extra = { argCount: '+', bang: true, - completer: function (arg) { + completer: function (context, arg, bang) { + let last = context.contextList.slice(-1)[0]; + context.title = ['Country Code']; + context.advance(last.offset - last.caret); + context.items = completion.filter(cl, last.filter); + /* if (!(arg = commands.parseArgs(arg, extra.options, extra.argCount))) return [0, []]; let m = arg.string.match(/\s(\w+)$/); return [(m ? m.index : arg.string.length) + 1, m ? completion.filter(cl, m[1]) : cl]; + */ } }; @@ -110,7 +116,8 @@ value = eval(value); kawase(value, clipboard, from, to); }, - extra + extra, + true ); })(); -- cgit v1.2.3