Skip to content

Add row/column information to text ranges (needs research if feasible and if it's really an improvement) #178

@gamecreature

Description

@gamecreature

Currently textranges are built put with caret/anchor offsets.
TreeSitter also uses TSPoint to store line/column information next to text changes.
Perhaps this is a good idea to also embed this in the edbee core textchange/selection information

TextChanges causes line/column differences in te document.
Which makes undo/redo operations, textscope manipulation more difficult.
In a lot of places the line/column information is very relevant.
When undo/redo changes it's efficient to know what the old row en new row was.

Downside is it somewhat increases the memory usage of the undo buffer/selection changes
Positive could be the simplification of some parts of the code.
And the extra information that's directly available.
It also improves the integration with TreeSitter

Note: This is a suggestion, I expect this to be a significant piece of work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions