diff options
author | anekos | 2008-11-27 21:12:05 +0000 |
---|---|---|
committer | anekos | 2008-11-27 21:12:05 +0000 |
commit | 8ae0812897ed96e22d31ae37838c4f4ef3b604c0 (patch) | |
tree | 8441828d8912abc6b8223a17297bf89820480d77 /xpcom_inspector.js | |
parent | 98c8e79b7790f9ee45749aec9bbd9c48e533e6e0 (diff) | |
download | vimperator-plugins-8ae0812897ed96e22d31ae37838c4f4ef3b604c0.tar.bz2 |
Follow CVS Head.
etc
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@25172 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'xpcom_inspector.js')
-rw-r--r-- | xpcom_inspector.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xpcom_inspector.js b/xpcom_inspector.js index 9d4e792..ebffef6 100644 --- a/xpcom_inspector.js +++ b/xpcom_inspector.js @@ -105,12 +105,11 @@ for (let c in Cc){ // Commands // ---------------------------------------------- commands.addUserCommand(['lscc'], 'List XPCOM class', - function(arg){ - if (!arg){ + function(args){ + if (!args.length){ liberator.echoerr('No arguments'); return; } - var args = args.arguments ? args.arguments: commands.parseArgs(arg).arguments; if (args.length == 1){ liberator.echo(liberator.XPCOM.listClass(args[0], null, true), true); } else if (args[1] in Ci){ @@ -120,9 +119,8 @@ commands.addUserCommand(['lscc'], 'List XPCOM class', liberator.echo(liberator.XPCOM.listClass(args[0], args[1], true), true); } }, { - completer: function(filter){ - if (!filter) return []; - var args = filter.arguments? filter.filter: commands.parseArgs(filter).arguments; + completer: function(context, args){ + if (!args.length) return; var list = []; var position = 0; var reg; @@ -138,7 +136,9 @@ commands.addUserCommand(['lscc'], 'List XPCOM class', } position = args[0].length + 1; } - return [position, list]; + context.title = ['Name', 'Number']; + context.advance(position); + context.completions = list; } } ); |