Get tests passing w/ multibuffer in editor

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2021-12-10 15:54:25 -08:00
parent 75dd37d873
commit 6caf016df9
2 changed files with 5 additions and 1 deletions

View file

@ -2403,8 +2403,9 @@ impl Editor {
let mut to_unfold = Vec::new();
let mut new_selections = Vec::new();
{
let selections = self.selections::<Point>(cx);
let buffer = self.buffer.read(cx).read(cx);
for selection in self.selections::<Point>(cx) {
for selection in selections {
for row in selection.start.row..selection.end.row {
let cursor = Point::new(row, buffer.line_len(row));
new_selections.push(Selection {