Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remix editor navigation issue : gotoline method is not defined #399

Open
delixus-pritesh opened this issue Apr 1, 2022 · 1 comment
Open

Comments

@delixus-pritesh
Copy link

i am trying to make a remix plugin. i have a line number and column number so i can navigate that to the respective editor line.
there is method called "gotoLine" which is available at editor API . But it is not clearly defined.
but i used await.call("editor" , "gotolLne", position); but it shows gotoLine method is not defined.

pleases help me on this issue. if gotoLine is not working ....is there any other method for navigation?

@Nahee-Park
Copy link

I think you can use gotoLine method like this

import { createClient } from '@remixproject/plugin-iframe'; // or use "@remixproject/plugin-webview"

const main = async (row: number, col:number) => {
      const client = createClient();
      await client.onload();
      await client.call('editor', 'gotoLine', row, col);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants