You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a list of ranges (IRange) that I care about and I want to updated them accordingly based on what edits have been made. Specifically:
shift the range accordingly if text was added / removed / edited before the start of the range
do nothing if the edit was after the range
remove the range entirely if an edit spans the full length of the range
split the range into two if an edit was made in the "middle" of the range
merge ranges if they overlap / touch each other
It seems to me a lot of this functionality is probably already implemented somewhere in the Decorators code base.
I'm hoping to get pointers to the codebase where this is happening or pointers to any type of util functions that would help with this type of "math" on top of ranges.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I have a list of ranges (
IRange
) that I care about and I want to updated them accordingly based on what edits have been made. Specifically:It seems to me a lot of this functionality is probably already implemented somewhere in the
Decorators
code base.I'm hoping to get pointers to the codebase where this is happening or pointers to any type of util functions that would help with this type of "math" on top of ranges.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions