Changeset 25054 for lang/javascript/vimperator-plugins
- Timestamp:
- 11/27/08 11:59:23 (6 weeks ago)
- Files:
-
- 1 modified
-
lang/javascript/vimperator-plugins/trunk/copy.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/copy.js
r24976 r25054 80 80 //const defaultValue = templates[0].label; 81 81 commands.addUserCommand(['copy'],'Copy to clipboard', 82 function(args , special){83 liberator.plugins.exCopy.copy(args.string, special);82 function(args){ 83 liberator.plugins.exCopy.copy(args.string, args.bang); 84 84 },{ 85 completer: function(context, arg , special){86 if ( special){85 completer: function(context, args){ 86 if (args.bang){ 87 87 completion.javascript(context); 88 88 return; … … 94 94 if (!context.filter){ context.completions = templates; return; } 95 95 var candidates = []; 96 context.completions = completion.filter(templates, context.filter, true); 96 var filter = context.filter.toLowerCase(); 97 templates.forEach(function(template){ 98 if (template[0].toLowerCase().indexOf(filter) == 0) 99 candidates.push(template); 100 }); 101 context.completions = candidates; 97 102 }, 98 103 bang: true
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)