operational-transform-rs
operational-transform-rs copied to clipboard
Why retain(n) only works if n equal to the length of the string?
Hi,
I'm trying to understand how this library works, I found it a little bit confusing:
let mut a = OpSeq::default();
a.retain(1);
a.insert("def");
let t = a.apply("abc").unwrap(); // only works if retain(3), otherwise t will be None
Accroding to my understanding, retain(n) should only fail if n is negative, or larger then the last position of the string, in the above code, should we get "adefbc" instead?