SIGN IN SIGN UP

fix: resolve crashes in DiffStreamHandler — unsafe cast and negative line numbers (#11893)

* fix: resolve crashes in DiffStreamHandler — unsafe cast and negative line numbers

- Use safe cast (as?) for TextEditor in undoChanges() to prevent ClassCastException
- Add early return for empty documents and clamp line numbers to prevent IndexOutOfBoundsException in initUnfinishedRangeHighlights()
- Remove redundant .toList() call in rejectAll()

Fixes #4267

* refactor: inline lineNum variable in initUnfinishedRangeHighlights
D
Dallin Romney committed
5a8d10fff4770c56642c308eddd36d1a2dacd237
Parent: e8d2c4e
Committed by GitHub <noreply@github.com> on 3/26/2026, 9:28:11 PM