Fix crash in apply text buffer operations found when opening a channel notes (#51978)

To do

* [x] turn the operations from collab into a failing test
* [x] fix the crash
* [ ] turn the huge set of operations into a succinct test that can be
checked in on main

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
c1cbea10e9Max Brunsfeld committed on 3/19/2026, 11:41:53 PM· committed by GitHubparent01fe4f6
3 files changedLine totals unavailable