Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
run(mode: QuickOpenMode): boolean {
if (mode !== QuickOpenMode.OPEN) {
return false;
}
// Search results are 1-based, positions in editors are 0-based.
const line = this.result.line - 1;
const character = this.result.character - 1;
const uri = new URI('file://' + this.result.file);
const r = Range.create(line, character, line, character + this.result.length);
open(this.openerService, uri, { selection: r });
return true;
}