Start on a randomized test for BlockMap

This is currently passing and ensures we maintain the input coordinate
space correctly.

Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Antonio Scandurra 2021-11-12 19:01:39 +01:00
parent d721c2ba4b
commit c8e47a8c63
4 changed files with 117 additions and 47 deletions

View file

@ -39,8 +39,7 @@ impl DisplayMap {
) -> Self {
let (fold_map, snapshot) = FoldMap::new(buffer.clone(), cx);
let (tab_map, snapshot) = TabMap::new(snapshot, tab_size);
let wrap_map =
cx.add_model(|cx| WrapMap::new(snapshot, font_id, font_size, wrap_width, cx));
let (wrap_map, _) = WrapMap::new(snapshot, font_id, font_size, wrap_width, cx);
cx.observe(&wrap_map, |_, _, cx| cx.notify()).detach();
DisplayMap {
buffer,