Show
Ignore:
Timestamp:
11/27/08 00:07:02 (6 weeks ago)
Author:
pekepeke
Message:

2.0pre補完対応

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/ubiquity.js

    r23278 r24977  
    7272        ubiquityManager.execute(args); 
    7373    }, { 
    74         completer: function(filter){ 
    75             return ubiquityManager.completer(filter); 
     74        completer: function(context, arg, special){ 
     75            ubiquityManager.completer(context, arg.string) 
    7676        } 
    7777    }, 
     
    109109        } 
    110110    }, 
    111     completer: function(args){ 
     111    completer: function(context, args){ 
    112112        var matches = args.match(/(\S+)(?:\s+(.+)$)?/); 
    113113        var suggestions = []; 
     
    115115            suggestions.push([cmd, this.commands[cmd].description]); 
    116116        } 
     117        context.title = ['Command','Description']; 
    117118        if (!matches){ 
    118             return [0, suggestions]; 
     119            context.items = suggestions; 
     120            return; 
    119121        } 
    120122        var [cmd, arg] = [matches[1], matches[2]]; 
     
    129131            } 
    130132        } else if (cmd){ 
    131             return [0, suggestions.filter(function(command){return command[0].indexOf(cmd) == 0;}) ]; 
     133            context.items = suggestions.filter(function(command){return command[0].indexOf(cmd) == 0;}); 
     134            return; 
    132135        } 
    133136        return [0, []];