sminez / ad

an adaptable text editor
https://crates.io/crates/ad-editor
MIT License
265 stars 9 forks source link

GapBuffer: finding range start/end can be done in a single pass #3

Closed sminez closed 1 month ago

sminez commented 7 months ago

The current implementation of several GapBuffer methods can be improved by finding the from/to offsets within the buffer in a single pass rather than starting from the beginning of the buffer each time. (This has always been known)