Skip to content

Support for converting line-column pair into byte offset #132

@segeljakt

Description

@segeljakt

It is currently possible to convert a byte offset into a line-column pair using Source::get_byte_line, but don't see a way to do the inverse operation. It would be a very useful feature when interoperating with LSP, which uses line-column pairs. Is it possible to add? I think it might be enough to make the method Line::byte_span public.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions