Repository: vscode
Issue: Diff Algorithm Assertion Failure
Labels: bug,diff-editor

[Repro](https://microsoft.github.io/monaco-editor/playground.html?source=v0.47.0-dev-20240308#XQAAAAJrUwAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscz7HRvtk3Y3lj4dcH2Tvg7M6KfcoCTKaQgK8N-ar_nmgOxNtLcuUptwu8ZWwLIS_lQzYSKhiK9qcWCeEOzfpooCH71rYSMuXIKRaUK8uJttqUTJABaOxIBIlsO0-CxTkC1vTaz6ueaQhfsCvleRHlfsNaicaRJ6MjGGerytvc5J9_HYy4RfejLp-FxzUIfEKNCmBPXKdxKRKjvksF7FSrY23Z6u3-bhG1wTkrf3UZ-YOBWU05VvUX22M2ioXSehRzGNiocGD9bedwIRcFhgy-JBddqA5GVlDwBidymPuN1-FXFeD-C6z6xaZoMREPGcAJh8AM8X79fggV467nacJvAsXA-JVOqIjvQSw6U2SowkP3auALbYF9EATXwKaqoa7KLBOA8r6fFetwPcc9vNo5280_LayjdJuBRUDkAiYU-Eiw8rQ4OQUnVyjWUodcYs6ZM61JfZcn4KdMhppkk5Y6WdK0j7aEGmZBt70e4UHLWfgtH5x0v34tQkQKvCy5CyBwE9WFFQYgI_7xnABBQBoOFrG5IquTtxvpcCK5DqiyvUTsH-branx48rUGS1g7quoIhslhdBp8alPs1N6mgDPKCrrUMqOLpWaF5LND4uG5ZZ6CiapNUNdY7AEHrN35kfgePxTkAB6660AI9cZ3xvpmSFjumgFvO36x7j59yn5wj0A-NAafjvGN6yXTp8YCvr73gfOngOdeec2cSiwOcs6cpupynYVIslg6ysOHF-TFnCT2df533PLy48XBJu4_yVmBa8pYH84fLLvJSDsii64QNe-GUZtBwtgx4ODfIT8MkkmUy-ISZ9ajGbO2tuaAEevL7dMui8IlAM0lBSlcsq4nwcy1MIOb25Tk5BLcf_aEEHEu42IGg4JWw7LSbsVmag_9r7N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BD5LYyVVbYcfWfJ2kkcBXHaoCeMLo5sQZ-eYqI8ZjtJIqTWfaKZe42vkoZXlHiNM2y-7gTED6suksoOmkoYwZquHftMxqEbQ5P3xKMW9bvPkn4SyUwILbEU6DYyo4DNLiJVvSHt_5Km-RWmli8TE8h_AhzOotYO8Ths-LIqCGmY4urY130MNm__K1hu-iphv8__wUs7z)

![chrome_tuD9KAIXWw](https://github.com/microsoft/vscode/assets/2931520/dd11a02d-791c-4716-a115-9213a1ea1e03)


(To verify, notice that the newest version does not log an assertion failure anymore)