bhughes339 / vscode-replacerules

Search/replace rule support for Visual Studio Code
GNU General Public License v3.0
41 stars 13 forks source link

Arguments missing with keybinding #14

Closed joseika closed 5 years ago

joseika commented 5 years ago

Hi, I installed the Replace Rules extension today, just what I needed. But I have trouble with the arguments when using keybinding, it/they don't seem to be passed on from registerTextEditorCommand. I'm on Linux x64 4.15.0-47-generic, VSCode 1.33.0, Replace Rules 0.2.3. Have not used the extension in previous versions of VSCode, so don't know if this is related to the latest release.

Got it to work by replacing in extension.js: context.subscriptions.push(vscode.commands.registerTextEditorCommand('replacerules.runRuleSet', (textEditor, edit, args) => { let ruleSet = args['ruleSet']; new editProvider_1.default(textEditor).runRuleSet(ruleSet); return; }));

Also looking forward to the 'replace in workspace' feature from pull requests!

Thanks

bhughes339 commented 5 years ago

I'll be pushing out a version that fixes this issue late today. Thank you!

joseika commented 5 years ago

Thank you for the prompt fix @bhughes339. Happy to confirm that my ruleset + keybinding works now.