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

issue: #185: use revealLine for line update #186

Conversation

aghArdeshir
Copy link
Contributor

This PR fixes #185

The solution was to use revealLine instead of setScrollPosition (which works with pixel values instead of line)
Also as it turns out, there are 3 methods: revealLine, revealLineInCenter and revealLineNearTop. I'm not sure if it's a good idea to add this complexityto Editor's props or to choose a different default behavior for monaco-react library.

@suren-atoyan
Copy link
Owner

I agree we don't need revealLineInCenter and revealLineNearTop as props. The user has access to editor instance, so, if they need a custom solution instead of the default one, they always can do it using editor instance.

@suren-atoyan suren-atoyan merged commit 09cf20f into suren-atoyan:master Feb 16, 2021
@suren-atoyan
Copy link
Owner

@Ardeshir81 the new version is here 🎉 v4.0.10

Thank you for your support!

@aghArdeshir
Copy link
Contributor Author

😍 Thanks @suren-atoyan
It was a very fast process and I really liked your workflow.

Thanks. I enjoyed a lot.

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

Successfully merging this pull request may close these issues.

Property line does not update Editor
2 participants