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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user