Allow mulitiple edits at the same offset.#158
Allow mulitiple edits at the same offset.#158dantleech wants to merge 1 commit intomicrosoft:masterfrom
Conversation
|
@dantleech, |
|
Why would you expect |
|
I don't know if its good to have the limitation or not - I suppose it can be worked around by building up all of the edits at that offset into a single edit. I do think that an exception would be better than assert in this case (as an exception will always be thrown whereas |
|
I don't know why one check is an assert, and the other is an exception. I think it would make sense to make the assert an exception as well. #161 |
Currently an Assertion error is thrown when text edits are made in the wrong order AND when multiple edits are made in the same place. Which I believe is a mistake as this works as expected until I run it in an environment with assertions turned on:
Expected:
Actual: Assertion error is thrown.
If assertions are disabled (
zend.assertions = -1) this works as expected.In addtion I changed the assertion to an
OutOfBoundsexception due to the inconsitency of the behavior ofassert.