-
Notifications
You must be signed in to change notification settings - Fork 69
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
Lines starting from 0 #113
Comments
@markusmoenig Sorry, but I'm not sure I understand the feature that you need. Do you need the first line to have a line number, which is labeled "0", or do you need the internal line count (in the line map) to start at 0? Changing the line number that is printed to the left of each line would instead require a change, but a very simple one. Internally, the line map already starts from 0 and the API allows to use both 0-based or 1-based line numbers when creating a position value. |
I would need the line numbers to count up from 0. Is that already in the API ? Did not see it. Thanks |
@mchakravarty While I have your attention, how do I get the current CURSOR position when it changes ? I seem to only be able to access selections and scroll positions ? I would need to get the current line position to show help information about the assembly instruction on that line. Thanks |
No, that's not yet supported, but easy to add. I'll try to have a look at it this or next week. (Or feel free to have a go yourself and send a PR.) |
You can do this with the
(The reason that this is not included in the position information is because you can use position also to set the selection and scroll position. Having the selection —with the insertion point as a special case— and line/column position in here would allow a lot of inconsistent values. In contrast, |
Hi,
would it be possible to add an option to start lines from 0 instead of 1 ?
I am working on a chip emulator in assembly which has offsets into tags starting from 0.
Thanks :)
The text was updated successfully, but these errors were encountered: