aboutsummaryrefslogtreecommitdiffstats
path: root/umihara.js
diff options
context:
space:
mode:
authoranekos2008-11-23 00:35:01 +0000
committeranekos2008-11-23 00:35:01 +0000
commit00b1f584a13c4cae8b0b84b6e3ffc67f7b9d037b (patch)
tree0030344502fe3b267f13964659ad43160629ae9a /umihara.js
parentc9148677771aa64b1169866b9631a2b5946ca79e (diff)
downloadvimperator-plugins-00b1f584a13c4cae8b0b84b6e3ffc67f7b9d037b.tar.bz2
follow the new completer.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24676 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'umihara.js')
-rw-r--r--umihara.js11
1 files changed, 9 insertions, 2 deletions
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
);
})();