Fix a few regressions related to the flicker fix (#9190)

This pull request fixes
https://github.com/zed-industries/zed/issues/9187 and fixes also ix a
rendering problem that would show cursors on the same plane:


![image](https://github.com/zed-industries/zed/assets/482957/208304a4-286a-4fd9-a3d8-e2913e3a3dc7)


Release Notes:

- N/A
91a0923fc4Antonio Scandurra committed on 3/11/2024, 5:07:26 PM· committed by GitHubparentb4ddc83
2 files changedLine totals unavailable