Add simulate_window_resize.

Fixes up tests for movement in editor/scrolling.

Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Piotr Osiewicz
2023-12-04 17:27:48 +01:00
co-authored by Antonio
parent 68d309e79c
commit b5924d6b11
8 changed files with 399 additions and 334 deletions
+5
View File
@@ -8243,6 +8243,11 @@ impl Editor {
self.style = Some(style);
}
#[cfg(any(test, feature = "test-support"))]
pub fn style(&self) -> Option<&EditorStyle> {
self.style.as_ref()
}
pub fn set_wrap_width(&self, width: Option<Pixels>, cx: &mut AppContext) -> bool {
self.display_map
.update(cx, |map, cx| map.set_wrap_width(width, cx))