Fix scrollbar markers for folded code (#11625)

There're two errors in scrollbar markers in the presence of folded code:

1. Some markers are not displayed (when the marked row numbers are
greater than the total displayed rows count after folding).
2. Code folding / unfolding doesn't trigger markers repainting.

This PR fixes both problems.

Release Notes:

- Fixed scrollbar markers for folded code.

The second problem (markers are repainted after I move the cursor, not
after folding):


https://github.com/zed-industries/zed/assets/2101250/57ed563d-186d-4497-98ab-d4f946416726
This commit is contained in:
Andrew Lygin
2024-05-09 14:23:21 -07:00
committed by GitHub
parent c73ef1a5f3
commit ba25e371be
2 changed files with 5 additions and 8 deletions
+3
View File
@@ -9225,6 +9225,8 @@ impl Editor {
self.active_diagnostics = Some(active_diagnostics);
}
}
self.scrollbar_marker_state.dirty = true;
}
}
@@ -9258,6 +9260,7 @@ impl Editor {
}
cx.notify();
self.scrollbar_marker_state.dirty = true;
}
}