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

[Plug-in API] Make all ranges zero based #2910

Closed
mmorhun opened this issue Sep 19, 2018 · 2 comments
Closed

[Plug-in API] Make all ranges zero based #2910

mmorhun opened this issue Sep 19, 2018 · 2 comments
Assignees
Labels
Team: Che-Editors issues regarding the che-editors team

Comments

@mmorhun
Copy link
Contributor

mmorhun commented Sep 19, 2018

For now we have 0-based and 1-based ranges in our plugin API implementation. Taking into account, that end user should use 0-based ranges we have to use the same inside our implementation and convert to 1-based only before passing to monaco editor (or before transfer via rpc, but it should be only one place).
Also this should include fix for existing API's.

@mmorhun mmorhun added the Team: Che-Editors issues regarding the che-editors team label Sep 19, 2018
@mmorhun
Copy link
Contributor Author

mmorhun commented Sep 19, 2018

toRange and fromRange in type-converters.ts aren't consistent. fromRange makes only columns 1-based and leaves line numbers as is (which is wrong).

@mmorhun
Copy link
Contributor Author

mmorhun commented Oct 8, 2018

Done.
Old plugins which use wrong indexing might work incorrectly now. All editor related indexes inside any plugin must be zero based (see docs).

@mmorhun mmorhun closed this as completed Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team: Che-Editors issues regarding the che-editors team
Projects
None yet
Development

No branches or pull requests

1 participant